modelcontextprotocol / modelcontextprotocol/csharp-sdk
Support elicitation and sampling requests in tasks/result response
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 4.5k
- Forks
- 814
- Avg merge
- 9d 19h
- Merged PRs (30d)
- 4
Description
The TS SDK has a similar test, "Input Required Flow | should handle elicitation during tool execution" that verifies that the elicitation request can be received via a call to tasks/result and that it will call the normal elicitation handler similar to what's described in https://modelcontextprotocol.io/specification/2025-11-25/basic/utilities/tasks#task-augmented-tool-call-with-elicitation
It doesn't look like we have similar logic in the server to include the elicitation/sampling request in the tasks/result response and in the client to parse the elicitation out of the tasks/result response and call the appropriate handler. Do we? I expect we need something similar to TS's TaskMessageQueue. If we don't have support for this, would it make sense to do this as a follow up? Or is it not worth doing?
Originally posted by @halter73 in https://github.com/modelcontextprotocol/csharp-sdk/pull/1170#discussion_r2734454942
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the referenced TypeScript integration test in test/integration/test/taskLifecycle.test.ts around lines 579-588, then trace the C# server and client handling for tasks/result. Confirm whether elicitation and sampling requests are included, parsed, and dispatched through the normal handlers; done means equivalent task-augmented tool-call coverage in the C# SDK.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api, backend-api-design
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100