-
Couldn't load subscription status.
- Fork 551
Closed
Description
Right now, we expose this overload for a server to elicit a user response:
csharp-sdk/src/ModelContextProtocol.Core/Server/McpServerExtensions.cs
Lines 223 to 224 in 3156818
| public static ValueTask<ElicitResult> ElicitAsync( | |
| this IMcpServer server, ElicitRequestParams request, CancellationToken cancellationToken = default) |
public static ValueTask<ElicitResult> ElicitAsync(
this IMcpServer server, ElicitRequestParams request, CancellationToken cancellationToken = default)We could smooth this over with another overload something like:
public static ValueTask<ElicitResult<T?>> ElicitAsync<T>(
this IMcpServer server, string message, JsonSerializerOptions? serializerOptions = null, CancellationToken cancellationToken = default) where T : classwhere we use the T to create the request schema and then automatically deserialize the response if the user supplied the requested data.
(Elicitation, however, employs a very constrained subset of JSON schema, so this would only work with a subset of Ts.)
Metadata
Metadata
Assignees
Labels
No labels