feat(mcp-server): add --tool-name flag to override the MCP tool identifier#2625
Open
tdabasinskas wants to merge 1 commit intodocker:mainfrom
Open
feat(mcp-server): add --tool-name flag to override the MCP tool identifier#2625tdabasinskas wants to merge 1 commit intodocker:mainfrom
--tool-name flag to override the MCP tool identifier#2625tdabasinskas wants to merge 1 commit intodocker:mainfrom
Conversation
243dda8 to
afc5818
Compare
dgageot
previously approved these changes
May 4, 2026
Member
|
@tdabasinskas not sure why, GitHub doesn't want to merge this one, because of hypothetical merge conflicts. Could you rebase? |
- Add `MCPToolName` field to `config.RuntimeConfig` and a `--tool-name` flag on the `serve mcp` subcommand - When set, the published MCP tool uses `MCPToolName` instead of the agent name (`cmp.Or(runConfig.MCPToolName, agentName)`); leaves the existing default unchanged when the flag is absent - Reject the flag at startup when more than one agent would be exposed — there is no sensible way to alias N agents under one tool name - Useful when an MCP client expects a fixed tool identifier independent of the underlying agent (gateway-side routing, frozen client schemas, A/B-testing two agent implementations behind the same tool name)
afc5818 to
653fd82
Compare
Contributor
Author
Done! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, the agent is exposed as a tool called
root. Most LLMs use a combination of MCP tool name and description to decide when to use the tool, so having a tool namedrootisn't very helpful.