Skip to content

Unable to access progress token in McpTool #67

Closed
@aaronpowell

Description

@aaronpowell

Is your feature request related to a problem? Please describe.
I'm attempting to build out a .NET implementation of server-everything and one of the features is the Long Running Operation. This requires access to a progress token (https://github.com/modelcontextprotocol/servers/blob/e328131d99847e1eae33c7a6a8156fd217cf984f/src/everything/everything.ts#L406) to provide notifications back to the client.

There does not appear to be a way to access that in the McpTool method.

Describe the solution you'd like
I think there should be a way to have an argument to the McpTool method that is bound to the request context (or the equivalent _meta property from TypeScript), in the same way you can have a HttpRequest on minimal API.

Describe alternatives you've considered
I've looked at the CallToolRequestParams when creating your own CallToolHandler callback but I don't think you can get to it through that either.

Additional context
Sample Code - https://github.com/aaronpowell/modelcontextprotocol-csharp-sdk/blob/dotnet-everything/samples/EverythingServer/Tools/LongRunningTool.cs

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions