modelcontextprotocol / modelcontextprotocol/csharp-sdk

Support elicitation and sampling requests in tasks/result response

Open
#1,184 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement P2 ready for work
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

https://github.com/modelcontextprotocol/typescript-sdk/blob/00249ce86dac558fb1089aea46d4d6d14e9a56c6/test/integration/test/taskLifecycle.test.ts#L579-L588

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.