Add ability for client to resume session (#1029)

This commit is contained in:
Stephen Halter 2025-11-25 14:31:10 -08:00 • committed by GitHub
commit 7f25ae9d2a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,29 @@
using ModelContextProtocol.Protocol;
namespace ModelContextProtocol.Client;
/// <summary>
/// Provides the metadata captured from a previous MCP client session that is required to resume it.
/// </summary>
public sealed class ResumeClientSessionOptions
{
/// <summary>
/// Gets or sets the server capabilities that were negotiated during the original session setialization.
/// </summary>
public required ServerCapabilities ServerCapabilities { get; set; }
/// <summary>
/// Gets or sets the server implementation metadata that identifies the connected MCP server.
/// </summary>
public required Implementation ServerInfo { get; set; }
/// <summary>
/// Gets or sets any instructions previously supplied by the server.
/// </summary>
public string? ServerInstructions { get; set; }
/// <summary>
/// Gets or sets the protocol version that was negotiated with the server.
/// </summary>
public string? NegotiatedProtocolVersion { get; set; }
}