-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow override of name and description of McpClientTool #165
Allow override of name and description of McpClientTool #165
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I'm not a huge fan of "With" methods outside of builder types, I don't have a better alternative at the moment😄
I think using |
Co-authored-by: Eirik Tsarpalis <[email protected]>
Co-authored-by: Eirik Tsarpalis <[email protected]>
tests/ModelContextProtocol.Tests/Client/McpClientExtensionsTests.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
…ts.cs Co-authored-by: Eirik Tsarpalis <[email protected]>
Addresses #154 by providing utility to clone McpClientTool with a new name or description. This will mostly be useful for hosts that need to be robust against user-configurable MCP servers (to avoid name conflicts by prefixing with the server name) and for hosts that use MCP servers known at development time where evaluation pipelines have shown that the name and/or descriptions of tools do not result in acceptable tool calling accuracy.
This could be used like this:
or