@@ -30,7 +30,7 @@ public static ValueTask<CreateMessageResult> SampleAsync(
30
30
this IMcpServer server , CreateMessageRequestParams request , CancellationToken cancellationToken = default )
31
31
{
32
32
Throw . IfNull ( server ) ;
33
- ThrowIfSamplingUnsupported ( server ) ;
33
+ ThrowIfClientSamplingUnsupported ( server ) ;
34
34
35
35
return server . SendRequestAsync (
36
36
RequestMethods . SamplingCreateMessage ,
@@ -164,7 +164,7 @@ public static async Task<ChatResponse> SampleAsync(
164
164
public static IChatClient AsSamplingChatClient ( this IMcpServer server )
165
165
{
166
166
Throw . IfNull ( server ) ;
167
- ThrowIfSamplingUnsupported ( server ) ;
167
+ ThrowIfClientSamplingUnsupported ( server ) ;
168
168
169
169
return new SamplingChatClient ( server ) ;
170
170
}
@@ -198,7 +198,7 @@ public static ValueTask<ListRootsResult> RequestRootsAsync(
198
198
this IMcpServer server , ListRootsRequestParams request , CancellationToken cancellationToken = default )
199
199
{
200
200
Throw . IfNull ( server ) ;
201
- ThrowIfRootsUnsupported ( server ) ;
201
+ ThrowIfClientRootsUnsupported ( server ) ;
202
202
203
203
return server . SendRequestAsync (
204
204
RequestMethods . RootsList ,
@@ -224,7 +224,7 @@ public static ValueTask<ElicitResult> ElicitAsync(
224
224
this IMcpServer server , ElicitRequestParams request , CancellationToken cancellationToken = default )
225
225
{
226
226
Throw . IfNull ( server ) ;
227
- ThrowIfElicitationUnsupported ( server ) ;
227
+ ThrowIfClientElicitationUnsupported ( server ) ;
228
228
229
229
return server . SendRequestAsync (
230
230
RequestMethods . ElicitationCreate ,
@@ -285,7 +285,7 @@ public static bool ClientSupportsSampling(this IMcpServer server)
285
285
return server . ClientCapabilities ? . Sampling is not null ;
286
286
}
287
287
288
- private static void ThrowIfSamplingUnsupported ( IMcpServer server )
288
+ private static void ThrowIfClientSamplingUnsupported ( IMcpServer server )
289
289
{
290
290
if ( server . ClientCapabilities ? . Sampling is null )
291
291
{
@@ -298,7 +298,7 @@ private static void ThrowIfSamplingUnsupported(IMcpServer server)
298
298
}
299
299
}
300
300
301
- private static void ThrowIfRootsUnsupported ( IMcpServer server )
301
+ private static void ThrowIfClientRootsUnsupported ( IMcpServer server )
302
302
{
303
303
if ( server . ClientCapabilities ? . Roots is null )
304
304
{
@@ -311,7 +311,7 @@ private static void ThrowIfRootsUnsupported(IMcpServer server)
311
311
}
312
312
}
313
313
314
- private static void ThrowIfElicitationUnsupported ( IMcpServer server )
314
+ private static void ThrowIfClientElicitationUnsupported ( IMcpServer server )
315
315
{
316
316
if ( server . ClientCapabilities ? . Elicitation is null )
317
317
{
0 commit comments