MCP Core docs edit pass (#1033)
Co-authored-by: Stephen Toub <stoub@microsoft.com>
This commit is contained in:
parent
ffda098192
commit
6ed728d005
1 changed files with 452 additions and 447 deletions
|
|
@ -30,17 +30,16 @@ public sealed class McpClientPrompt
|
|||
/// <remarks>
|
||||
/// <para>
|
||||
/// This constructor enables reusing cached prompt definitions across different <see cref="McpClient"/> instances
|
||||
/// without needing to call <see cref="McpClient.ListPromptsAsync"/> on every reconnect. This is particularly useful
|
||||
/// without needing to call <see cref="McpClient.ListPromptsAsync"/> on every reconnect. This is particularly useful
|
||||
/// in scenarios where prompt definitions are stable and network round-trips should be minimized.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// The provided <paramref name="prompt"/> must represent a prompt that is actually available on the server
|
||||
/// associated with the <paramref name="client"/>. Attempting to invoke a prompt that doesn't exist on the
|
||||
/// The provided <paramref name="prompt"/> must represent a prompt that is actually available on the server
|
||||
/// associated with the <paramref name="client"/>. Attempting to invoke a prompt that doesn't exist on the
|
||||
/// server will result in an <see cref="McpException"/>.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
/// <exception cref="ArgumentNullException"><paramref name="client"/> is <see langword="null"/>.</exception>
|
||||
/// <exception cref="ArgumentNullException"><paramref name="prompt"/> is <see langword="null"/>.</exception>
|
||||
/// <exception cref="ArgumentNullException"><paramref name="client"/> or <paramref name="prompt"/> is <see langword="null"/>.</exception>
|
||||
public McpClientPrompt(McpClient client, Prompt prompt)
|
||||
{
|
||||
Throw.IfNull(client);
|
||||
|
|
@ -57,7 +56,7 @@ public sealed class McpClientPrompt
|
|||
/// which can be useful for advanced scenarios or when implementing custom MCP client extensions.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// For most common use cases, you can use the more convenient <see cref="Name"/> and
|
||||
/// For most common use cases, you can use the more convenient <see cref="Name"/> and
|
||||
/// <see cref="Description"/> properties instead of accessing the <see cref="ProtocolPrompt"/> directly.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
|
|
@ -69,7 +68,7 @@ public sealed class McpClientPrompt
|
|||
/// <summary>Gets the title of the prompt.</summary>
|
||||
public string? Title => ProtocolPrompt.Title;
|
||||
|
||||
/// <summary>Gets a description of the prompt.</summary>
|
||||
/// <summary>Gets the description of the prompt.</summary>
|
||||
public string? Description => ProtocolPrompt.Description;
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -85,7 +84,7 @@ public sealed class McpClientPrompt
|
|||
/// The server will process the request and return a result containing messages or other content.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// This is a convenience method that internally calls <see cref="McpClient.GetPromptAsync"/>
|
||||
/// This is a convenience method that internally calls <see cref="McpClient.GetPromptAsync"/>
|
||||
/// with this prompt's name and arguments.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
|
|
@ -100,4 +99,4 @@ public sealed class McpClientPrompt
|
|||
|
||||
return await _client.GetPromptAsync(ProtocolPrompt.Name, argDict, serializerOptions, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue