@@ -7,62 +7,62 @@ namespace ModelContextProtocol.Protocol.Types;
7
7
/// Represents the capabilities that a client may support.
8
8
/// <see href="https://github.com/modelcontextprotocol/specification/blob/main/schema/2024-11-05/schema.json">See the schema for details</see>
9
9
/// </summary>
10
- public record ClientCapabilities
10
+ public class ClientCapabilities
11
11
{
12
12
/// <summary>
13
13
/// Experimental, non-standard capabilities that the client supports.
14
14
/// </summary>
15
15
[ JsonPropertyName ( "experimental" ) ]
16
- public Dictionary < string , object > ? Experimental { get ; init ; }
16
+ public Dictionary < string , object > ? Experimental { get ; set ; }
17
17
18
18
/// <summary>
19
19
/// Present if the client supports listing roots.
20
20
/// </summary>
21
21
[ JsonPropertyName ( "roots" ) ]
22
- public RootsCapability ? Roots { get ; init ; }
22
+ public RootsCapability ? Roots { get ; set ; }
23
23
24
24
/// <summary>
25
25
/// Present if the client supports sampling from an LLM.
26
26
/// </summary>
27
27
[ JsonPropertyName ( "sampling" ) ]
28
- public SamplingCapability ? Sampling { get ; init ; }
28
+ public SamplingCapability ? Sampling { get ; set ; }
29
29
}
30
30
31
31
/// <summary>
32
32
/// Represents the roots capability configuration.
33
33
/// <see href="https://github.com/modelcontextprotocol/specification/blob/main/schema/2024-11-05/schema.json">See the schema for details</see>
34
34
/// </summary>
35
- public record RootsCapability
35
+ public class RootsCapability
36
36
{
37
37
/// <summary>
38
38
/// Whether the client supports notifications for changes to the roots list.
39
39
/// </summary>
40
40
[ JsonPropertyName ( "listChanged" ) ]
41
- public bool ? ListChanged { get ; init ; }
41
+ public bool ? ListChanged { get ; set ; }
42
42
43
43
/// <summary>Gets or sets the handler for sampling requests.</summary>
44
44
[ JsonIgnore ]
45
- public Func < ListRootsRequestParams ? , CancellationToken , Task < ListRootsResult > > ? RootsHandler { get ; init ; }
45
+ public Func < ListRootsRequestParams ? , CancellationToken , Task < ListRootsResult > > ? RootsHandler { get ; set ; }
46
46
}
47
47
48
48
/// <summary>
49
49
/// Represents the sampling capability configuration.
50
50
/// <see href="https://github.com/modelcontextprotocol/specification/blob/main/schema/2024-11-05/schema.json">See the schema for details</see>
51
51
/// </summary>
52
- public record SamplingCapability
52
+ public class SamplingCapability
53
53
{
54
54
// Currently empty in the spec, but may be extended in the future
55
55
56
56
/// <summary>Gets or sets the handler for sampling requests.</summary>
57
57
[ JsonIgnore ]
58
- public Func < CreateMessageRequestParams ? , CancellationToken , Task < CreateMessageResult > > ? SamplingHandler { get ; init ; }
58
+ public Func < CreateMessageRequestParams ? , CancellationToken , Task < CreateMessageResult > > ? SamplingHandler { get ; set ; }
59
59
}
60
60
61
61
/// <summary>
62
62
/// Represents the logging capability configuration.
63
63
/// <see href="https://github.com/modelcontextprotocol/specification/blob/main/schema/2024-11-05/schema.json">See the schema for details</see>
64
64
/// </summary>
65
- public record LoggingCapability
65
+ public class LoggingCapability
66
66
{
67
67
// Currently empty in the spec, but may be extended in the future
68
68
@@ -71,106 +71,106 @@ public record LoggingCapability
71
71
/// Gets or sets the handler for set logging level requests.
72
72
/// </summary>
73
73
[ JsonIgnore ]
74
- public Func < RequestContext < SetLevelRequestParams > , CancellationToken , Task < EmptyResult > > ? SetLoggingLevelHandler { get ; init ; }
74
+ public Func < RequestContext < SetLevelRequestParams > , CancellationToken , Task < EmptyResult > > ? SetLoggingLevelHandler { get ; set ; }
75
75
}
76
76
77
77
/// <summary>
78
78
/// Represents the prompts capability configuration.
79
79
/// <see href="https://github.com/modelcontextprotocol/specification/blob/main/schema/2024-11-05/schema.json">See the schema for details</see>
80
80
/// </summary>
81
- public record PromptsCapability
81
+ public class PromptsCapability
82
82
{
83
83
/// <summary>
84
84
/// Whether this server supports notifications for changes to the prompt list.
85
85
/// </summary>
86
86
[ JsonPropertyName ( "listChanged" ) ]
87
- public bool ? ListChanged { get ; init ; }
87
+ public bool ? ListChanged { get ; set ; }
88
88
89
89
/// <summary>
90
90
/// Gets or sets the handler for list prompts requests.
91
91
/// </summary>
92
92
[ JsonIgnore ]
93
- public Func < RequestContext < ListPromptsRequestParams > , CancellationToken , Task < ListPromptsResult > > ? ListPromptsHandler { get ; init ; }
93
+ public Func < RequestContext < ListPromptsRequestParams > , CancellationToken , Task < ListPromptsResult > > ? ListPromptsHandler { get ; set ; }
94
94
95
95
/// <summary>
96
96
/// Gets or sets the handler for get prompt requests.
97
97
/// </summary>
98
98
[ JsonIgnore ]
99
- public Func < RequestContext < GetPromptRequestParams > , CancellationToken , Task < GetPromptResult > > ? GetPromptHandler { get ; init ; }
99
+ public Func < RequestContext < GetPromptRequestParams > , CancellationToken , Task < GetPromptResult > > ? GetPromptHandler { get ; set ; }
100
100
}
101
101
102
102
/// <summary>
103
103
/// Represents the resources capability configuration.
104
104
/// <see href="https://github.com/modelcontextprotocol/specification/blob/main/schema/2024-11-05/schema.json">See the schema for details</see>
105
105
/// </summary>
106
- public record ResourcesCapability
106
+ public class ResourcesCapability
107
107
{
108
108
/// <summary>
109
109
/// Whether this server supports subscribing to resource updates.
110
110
/// </summary>
111
111
[ JsonPropertyName ( "subscribe" ) ]
112
- public bool ? Subscribe { get ; init ; }
112
+ public bool ? Subscribe { get ; set ; }
113
113
114
114
/// <summary>
115
115
/// Whether this server supports notifications for changes to the resource list.
116
116
/// </summary>
117
117
[ JsonPropertyName ( "listChanged" ) ]
118
- public bool ? ListChanged { get ; init ; }
118
+ public bool ? ListChanged { get ; set ; }
119
119
120
120
/// <summary>
121
121
/// Gets or sets the handler for list resource templates requests.
122
122
/// </summary>
123
123
[ JsonIgnore ]
124
- public Func < RequestContext < ListResourceTemplatesRequestParams > , CancellationToken , Task < ListResourceTemplatesResult > > ? ListResourceTemplatesHandler { get ; init ; }
124
+ public Func < RequestContext < ListResourceTemplatesRequestParams > , CancellationToken , Task < ListResourceTemplatesResult > > ? ListResourceTemplatesHandler { get ; set ; }
125
125
126
126
/// <summary>
127
127
/// Gets or sets the handler for list resources requests.
128
128
/// </summary>
129
129
[ JsonIgnore ]
130
- public Func < RequestContext < ListResourcesRequestParams > , CancellationToken , Task < ListResourcesResult > > ? ListResourcesHandler { get ; init ; }
130
+ public Func < RequestContext < ListResourcesRequestParams > , CancellationToken , Task < ListResourcesResult > > ? ListResourcesHandler { get ; set ; }
131
131
132
132
/// <summary>
133
133
/// Gets or sets the handler for read resources requests.
134
134
/// </summary>
135
135
[ JsonIgnore ]
136
- public Func < RequestContext < ReadResourceRequestParams > , CancellationToken , Task < ReadResourceResult > > ? ReadResourceHandler { get ; init ; }
136
+ public Func < RequestContext < ReadResourceRequestParams > , CancellationToken , Task < ReadResourceResult > > ? ReadResourceHandler { get ; set ; }
137
137
138
138
/// <summary>
139
139
/// Gets or sets the handler for subscribe to resources messages.
140
140
/// </summary>
141
141
[ JsonIgnore ]
142
- public Func < RequestContext < SubscribeRequestParams > , CancellationToken , Task < EmptyResult > > ? SubscribeToResourcesHandler { get ; init ; }
142
+ public Func < RequestContext < SubscribeRequestParams > , CancellationToken , Task < EmptyResult > > ? SubscribeToResourcesHandler { get ; set ; }
143
143
144
144
/// <summary>
145
145
/// Gets or sets the handler for unsubscribe from resources messages.
146
146
/// </summary>
147
147
[ JsonIgnore ]
148
- public Func < RequestContext < UnsubscribeRequestParams > , CancellationToken , Task < EmptyResult > > ? UnsubscribeFromResourcesHandler { get ; init ; }
148
+ public Func < RequestContext < UnsubscribeRequestParams > , CancellationToken , Task < EmptyResult > > ? UnsubscribeFromResourcesHandler { get ; set ; }
149
149
}
150
150
151
151
/// <summary>
152
152
/// Represents the tools capability configuration.
153
153
/// <see href="https://github.com/modelcontextprotocol/specification/blob/main/schema/2024-11-05/schema.json">See the schema for details</see>
154
154
/// </summary>
155
- public record ToolsCapability
155
+ public class ToolsCapability
156
156
{
157
157
/// <summary>
158
158
/// Gets or sets whether this server supports notifications for changes to the tool list.
159
159
/// </summary>
160
160
[ JsonPropertyName ( "listChanged" ) ]
161
- public bool ? ListChanged { get ; init ; }
161
+ public bool ? ListChanged { get ; set ; }
162
162
163
163
/// <summary>
164
164
/// Gets or sets the handler for list tools requests.
165
165
/// </summary>
166
166
[ JsonIgnore ]
167
- public Func < RequestContext < ListToolsRequestParams > , CancellationToken , Task < ListToolsResult > > ? ListToolsHandler { get ; init ; }
167
+ public Func < RequestContext < ListToolsRequestParams > , CancellationToken , Task < ListToolsResult > > ? ListToolsHandler { get ; set ; }
168
168
169
169
/// <summary>
170
170
/// Gets or sets the handler for call tool requests.
171
171
/// </summary>
172
172
[ JsonIgnore ]
173
- public Func < RequestContext < CallToolRequestParams > , CancellationToken , Task < CallToolResponse > > ? CallToolHandler { get ; init ; }
173
+ public Func < RequestContext < CallToolRequestParams > , CancellationToken , Task < CallToolResponse > > ? CallToolHandler { get ; set ; }
174
174
175
175
/// <summary>Gets or sets a collection of tools served by the server.</summary>
176
176
/// <remarks>
@@ -182,5 +182,5 @@ public record ToolsCapability
182
182
/// will be invoked as a fallback.
183
183
/// </remarks>
184
184
[ JsonIgnore ]
185
- public McpServerToolCollection ? ToolCollection { get ; init ; }
185
+ public McpServerToolCollection ? ToolCollection { get ; set ; }
186
186
}
0 commit comments