@@ -7,62 +7,62 @@ namespace ModelContextProtocol.Protocol.Types;
77/// Represents the capabilities that a client may support.
88/// <see href="https://github.com/modelcontextprotocol/specification/blob/main/schema/2024-11-05/schema.json">See the schema for details</see>
99/// </summary>
10- public record ClientCapabilities
10+ public class ClientCapabilities
1111{
1212 /// <summary>
1313 /// Experimental, non-standard capabilities that the client supports.
1414 /// </summary>
1515 [ JsonPropertyName ( "experimental" ) ]
16- public Dictionary < string , object > ? Experimental { get ; init ; }
16+ public Dictionary < string , object > ? Experimental { get ; set ; }
1717
1818 /// <summary>
1919 /// Present if the client supports listing roots.
2020 /// </summary>
2121 [ JsonPropertyName ( "roots" ) ]
22- public RootsCapability ? Roots { get ; init ; }
22+ public RootsCapability ? Roots { get ; set ; }
2323
2424 /// <summary>
2525 /// Present if the client supports sampling from an LLM.
2626 /// </summary>
2727 [ JsonPropertyName ( "sampling" ) ]
28- public SamplingCapability ? Sampling { get ; init ; }
28+ public SamplingCapability ? Sampling { get ; set ; }
2929}
3030
3131/// <summary>
3232/// Represents the roots capability configuration.
3333/// <see href="https://github.com/modelcontextprotocol/specification/blob/main/schema/2024-11-05/schema.json">See the schema for details</see>
3434/// </summary>
35- public record RootsCapability
35+ public class RootsCapability
3636{
3737 /// <summary>
3838 /// Whether the client supports notifications for changes to the roots list.
3939 /// </summary>
4040 [ JsonPropertyName ( "listChanged" ) ]
41- public bool ? ListChanged { get ; init ; }
41+ public bool ? ListChanged { get ; set ; }
4242
4343 /// <summary>Gets or sets the handler for sampling requests.</summary>
4444 [ JsonIgnore ]
45- public Func < ListRootsRequestParams ? , CancellationToken , Task < ListRootsResult > > ? RootsHandler { get ; init ; }
45+ public Func < ListRootsRequestParams ? , CancellationToken , Task < ListRootsResult > > ? RootsHandler { get ; set ; }
4646}
4747
4848/// <summary>
4949/// Represents the sampling capability configuration.
5050/// <see href="https://github.com/modelcontextprotocol/specification/blob/main/schema/2024-11-05/schema.json">See the schema for details</see>
5151/// </summary>
52- public record SamplingCapability
52+ public class SamplingCapability
5353{
5454 // Currently empty in the spec, but may be extended in the future
5555
5656 /// <summary>Gets or sets the handler for sampling requests.</summary>
5757 [ JsonIgnore ]
58- public Func < CreateMessageRequestParams ? , CancellationToken , Task < CreateMessageResult > > ? SamplingHandler { get ; init ; }
58+ public Func < CreateMessageRequestParams ? , CancellationToken , Task < CreateMessageResult > > ? SamplingHandler { get ; set ; }
5959}
6060
6161/// <summary>
6262/// Represents the logging capability configuration.
6363/// <see href="https://github.com/modelcontextprotocol/specification/blob/main/schema/2024-11-05/schema.json">See the schema for details</see>
6464/// </summary>
65- public record LoggingCapability
65+ public class LoggingCapability
6666{
6767 // Currently empty in the spec, but may be extended in the future
6868
@@ -71,106 +71,106 @@ public record LoggingCapability
7171 /// Gets or sets the handler for set logging level requests.
7272 /// </summary>
7373 [ JsonIgnore ]
74- public Func < RequestContext < SetLevelRequestParams > , CancellationToken , Task < EmptyResult > > ? SetLoggingLevelHandler { get ; init ; }
74+ public Func < RequestContext < SetLevelRequestParams > , CancellationToken , Task < EmptyResult > > ? SetLoggingLevelHandler { get ; set ; }
7575}
7676
7777/// <summary>
7878/// Represents the prompts capability configuration.
7979/// <see href="https://github.com/modelcontextprotocol/specification/blob/main/schema/2024-11-05/schema.json">See the schema for details</see>
8080/// </summary>
81- public record PromptsCapability
81+ public class PromptsCapability
8282{
8383 /// <summary>
8484 /// Whether this server supports notifications for changes to the prompt list.
8585 /// </summary>
8686 [ JsonPropertyName ( "listChanged" ) ]
87- public bool ? ListChanged { get ; init ; }
87+ public bool ? ListChanged { get ; set ; }
8888
8989 /// <summary>
9090 /// Gets or sets the handler for list prompts requests.
9191 /// </summary>
9292 [ JsonIgnore ]
93- public Func < RequestContext < ListPromptsRequestParams > , CancellationToken , Task < ListPromptsResult > > ? ListPromptsHandler { get ; init ; }
93+ public Func < RequestContext < ListPromptsRequestParams > , CancellationToken , Task < ListPromptsResult > > ? ListPromptsHandler { get ; set ; }
9494
9595 /// <summary>
9696 /// Gets or sets the handler for get prompt requests.
9797 /// </summary>
9898 [ JsonIgnore ]
99- public Func < RequestContext < GetPromptRequestParams > , CancellationToken , Task < GetPromptResult > > ? GetPromptHandler { get ; init ; }
99+ public Func < RequestContext < GetPromptRequestParams > , CancellationToken , Task < GetPromptResult > > ? GetPromptHandler { get ; set ; }
100100}
101101
102102/// <summary>
103103/// Represents the resources capability configuration.
104104/// <see href="https://github.com/modelcontextprotocol/specification/blob/main/schema/2024-11-05/schema.json">See the schema for details</see>
105105/// </summary>
106- public record ResourcesCapability
106+ public class ResourcesCapability
107107{
108108 /// <summary>
109109 /// Whether this server supports subscribing to resource updates.
110110 /// </summary>
111111 [ JsonPropertyName ( "subscribe" ) ]
112- public bool ? Subscribe { get ; init ; }
112+ public bool ? Subscribe { get ; set ; }
113113
114114 /// <summary>
115115 /// Whether this server supports notifications for changes to the resource list.
116116 /// </summary>
117117 [ JsonPropertyName ( "listChanged" ) ]
118- public bool ? ListChanged { get ; init ; }
118+ public bool ? ListChanged { get ; set ; }
119119
120120 /// <summary>
121121 /// Gets or sets the handler for list resource templates requests.
122122 /// </summary>
123123 [ JsonIgnore ]
124- public Func < RequestContext < ListResourceTemplatesRequestParams > , CancellationToken , Task < ListResourceTemplatesResult > > ? ListResourceTemplatesHandler { get ; init ; }
124+ public Func < RequestContext < ListResourceTemplatesRequestParams > , CancellationToken , Task < ListResourceTemplatesResult > > ? ListResourceTemplatesHandler { get ; set ; }
125125
126126 /// <summary>
127127 /// Gets or sets the handler for list resources requests.
128128 /// </summary>
129129 [ JsonIgnore ]
130- public Func < RequestContext < ListResourcesRequestParams > , CancellationToken , Task < ListResourcesResult > > ? ListResourcesHandler { get ; init ; }
130+ public Func < RequestContext < ListResourcesRequestParams > , CancellationToken , Task < ListResourcesResult > > ? ListResourcesHandler { get ; set ; }
131131
132132 /// <summary>
133133 /// Gets or sets the handler for read resources requests.
134134 /// </summary>
135135 [ JsonIgnore ]
136- public Func < RequestContext < ReadResourceRequestParams > , CancellationToken , Task < ReadResourceResult > > ? ReadResourceHandler { get ; init ; }
136+ public Func < RequestContext < ReadResourceRequestParams > , CancellationToken , Task < ReadResourceResult > > ? ReadResourceHandler { get ; set ; }
137137
138138 /// <summary>
139139 /// Gets or sets the handler for subscribe to resources messages.
140140 /// </summary>
141141 [ JsonIgnore ]
142- public Func < RequestContext < SubscribeRequestParams > , CancellationToken , Task < EmptyResult > > ? SubscribeToResourcesHandler { get ; init ; }
142+ public Func < RequestContext < SubscribeRequestParams > , CancellationToken , Task < EmptyResult > > ? SubscribeToResourcesHandler { get ; set ; }
143143
144144 /// <summary>
145145 /// Gets or sets the handler for unsubscribe from resources messages.
146146 /// </summary>
147147 [ JsonIgnore ]
148- public Func < RequestContext < UnsubscribeRequestParams > , CancellationToken , Task < EmptyResult > > ? UnsubscribeFromResourcesHandler { get ; init ; }
148+ public Func < RequestContext < UnsubscribeRequestParams > , CancellationToken , Task < EmptyResult > > ? UnsubscribeFromResourcesHandler { get ; set ; }
149149}
150150
151151/// <summary>
152152/// Represents the tools capability configuration.
153153/// <see href="https://github.com/modelcontextprotocol/specification/blob/main/schema/2024-11-05/schema.json">See the schema for details</see>
154154/// </summary>
155- public record ToolsCapability
155+ public class ToolsCapability
156156{
157157 /// <summary>
158158 /// Gets or sets whether this server supports notifications for changes to the tool list.
159159 /// </summary>
160160 [ JsonPropertyName ( "listChanged" ) ]
161- public bool ? ListChanged { get ; init ; }
161+ public bool ? ListChanged { get ; set ; }
162162
163163 /// <summary>
164164 /// Gets or sets the handler for list tools requests.
165165 /// </summary>
166166 [ JsonIgnore ]
167- public Func < RequestContext < ListToolsRequestParams > , CancellationToken , Task < ListToolsResult > > ? ListToolsHandler { get ; init ; }
167+ public Func < RequestContext < ListToolsRequestParams > , CancellationToken , Task < ListToolsResult > > ? ListToolsHandler { get ; set ; }
168168
169169 /// <summary>
170170 /// Gets or sets the handler for call tool requests.
171171 /// </summary>
172172 [ JsonIgnore ]
173- public Func < RequestContext < CallToolRequestParams > , CancellationToken , Task < CallToolResponse > > ? CallToolHandler { get ; init ; }
173+ public Func < RequestContext < CallToolRequestParams > , CancellationToken , Task < CallToolResponse > > ? CallToolHandler { get ; set ; }
174174
175175 /// <summary>Gets or sets a collection of tools served by the server.</summary>
176176 /// <remarks>
@@ -182,5 +182,5 @@ public record ToolsCapability
182182 /// will be invoked as a fallback.
183183 /// </remarks>
184184 [ JsonIgnore ]
185- public McpServerToolCollection ? ToolCollection { get ; init ; }
185+ public McpServerToolCollection ? ToolCollection { get ; set ; }
186186}
0 commit comments