AI seeded comments from robch and then edited by stephentoub (#238)
* AI generated `///` comment updates * Fix compilation issues * Fix incorrect XML comment structure * Update all Client comments * Update all Configuration comments * Update all Messages comments * Update all Transport comments * Update all Types comments * Update all Server comments * Undo some commenting --------- Co-authored-by: Stephen Toub <stoub@microsoft.com>
This commit is contained in:
parent
07300389ee
commit
77871c5aac
1 changed files with 4017 additions and 1066 deletions
|
|
@ -1,31 +1,59 @@
|
|||
using ModelContextProtocol.Protocol.Types;
|
||||
using ModelContextProtocol.Protocol.Types;
|
||||
|
||||
namespace ModelContextProtocol.Client;
|
||||
|
||||
/// <summary>
|
||||
/// Configuration options for the MCP client. This is passed to servers during the initialization sequence, letting them know about the client's capabilities and
|
||||
/// protocol version.
|
||||
/// <see href="https://spec.modelcontextprotocol.io/specification/2024-11-05/basic/lifecycle/">See the protocol specification for details on capability negotiation</see>
|
||||
/// Provides configuration options for creating <see cref="IMcpClient"/> instances.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// These options are typically passed to <see cref="McpClientFactory.CreateAsync"/> when creating a client.
|
||||
/// They define client capabilities, protocol version, and other client-specific settings.
|
||||
/// </remarks>
|
||||
public class McpClientOptions
|
||||
{
|
||||
/// <summary>
|
||||
/// Information about this client implementation.
|
||||
/// Gets or sets information about this client implementation, including its name and version.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// This information is sent to the server during initialization to identify the client.
|
||||
/// It's often displayed in server logs and can be used for debugging and compatibility checks.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// When not specified, information sourced from the current process will be used.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public Implementation? ClientInfo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Client capabilities to advertise to the server.
|
||||
/// Gets or sets the client capabilities to advertise to the server.
|
||||
/// </summary>
|
||||
public ClientCapabilities? Capabilities { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Protocol version to request from the server.
|
||||
/// Gets or sets the protocol version to request from the server, using a date-based versioning scheme.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The protocol version is a key part of the initialization handshake. The client and server must
|
||||
/// agree on a compatible protocol version to communicate successfully. If the server doesn't support
|
||||
/// the requested version, it will respond with a version mismatch error.
|
||||
/// </remarks>
|
||||
public string ProtocolVersion { get; set; } = "2024-11-05";
|
||||
|
||||
/// <summary>
|
||||
/// Timeout for initialization sequence.
|
||||
/// Gets or sets a timeout for the client-server initialization handshake sequence.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// This timeout determines how long the client will wait for the server to respond during
|
||||
/// the initialization protocol handshake. If the server doesn't respond within this timeframe,
|
||||
/// an exception will be thrown.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// Setting an appropriate timeout prevents the client from hanging indefinitely when
|
||||
/// connecting to unresponsive servers.
|
||||
/// </para>
|
||||
/// <para>The default value is 60 seconds.</para>
|
||||
/// </remarks>
|
||||
public TimeSpan InitializationTimeout { get; set; } = TimeSpan.FromSeconds(60);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue