8000 Add the MCP name to MCPClientTool class · Issue #497 · modelcontextprotocol/csharp-sdk · GitHub
[go: up one dir, main page]

Skip to content
Add the MCP name to MCPClientTool class #497
Open
@raffaeler

Description

@raffaeler

Is your feature request related to a problem? Please describe.
In my app I can dynamically enable or disable the use of the functions belonging to a MCP server.
When selecting multiple MCPs there is the risk of colliding function names belonging to different MCPs.
It would be useful to be able to preserve the name of the MCP server the functions belong so that I can keep trace of that and decide what to do.

Describe the solution you'd like
When I request the list of the tools using ListToolsAsync, the resulting list of McpClientTool should preserve the name of the MCP.
The change I am suggesting is to add a property in the McpClientTool such as string McpName {get; init; }.

Describe alternatives you've considered

  • Inheritance: even if I derive the McpClientTool class, I could not make the ListToolsAsync to use my type.
  • Composition: This is what I am doing now, but the resulting code is quite weird as it spans across different libraries just for this new type.
  • Using AdditionalProperties. The dictionary is read-only.

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

      0