Dynamic Tool Description based on Route Variable in path
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by reviewing the C# MCP SDK's route handling and tool-list response generation; the issue does not name specific files or tests. Compare the requested /{routeVariable1}/mcp/tools/list examples and determine where route context could affect a tool description. Done means establishing whether this pattern is supported and documenting or demonstrating the implementation path.
Written by the indexing model from the issue text.
Description
Is your feature request related to a problem? Please describe.
We're trying to create an MCP Server Tool on an asp.net server using this SDK.
As a part of this- we'd like a way to support dynamic descriptions of an mcp tool based on a route variable in the path.
Example-
Request path - /{routeVariable1}/mcp
For the tool list call- we'd like to have a tool description generated based on the value of the routeVariable1. A method call like GetToolDescription(IHttpContext context) => "This is the description for {context.GetRouteVariable["routeVariable1"]} tool.
Sample request/responses
Example 1
/routevariable1/mcp/tools/list
--> returns "This is the description for routevariable1 tool.
Example 2
/routevariable2/mcp/tools/list
--> returns "This is the description for routevariable2 tool.
Is the above pattern supported by the C# MCP SDK?
If yes, could you point me to a sample of how we could implement this?
- Dominant language
- C#
- Stars
- 4.5k
- Forks
- 814
- Avg merge
- 9d 19h
- Merged PRs (30d)
- 4
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.
More from modelcontextprotocol/csharp-sdk
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
modelcontextprotocol/csharp-sdk#1867 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
modelcontextprotocol/csharp-sdk#1840 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
modelcontextprotocol/csharp-sdk#1836 ·
-
enhancement needs confirmation
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
modelcontextprotocol/csharp-sdk#678 · 1 comment ·
-
enhancement needs confirmation P3 ready for work
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
modelcontextprotocol/csharp-sdk#515 · 6 comments · 3 reactions ·
All issues in modelcontextprotocol/csharp-sdk
Similar issues
-
priority-0
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
StackExchange/StackExchange.Redis#3249 ·
-
[Feat] 조합 영역 구분선 개선 Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
type/automation type/tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100