Skip to content

feat(mcp-server): add --tool-name flag to override the MCP tool identifier#2625

Open
tdabasinskas wants to merge 1 commit intodocker:mainfrom
cogvel:feat/mcp-tool-name
Open

feat(mcp-server): add --tool-name flag to override the MCP tool identifier#2625
tdabasinskas wants to merge 1 commit intodocker:mainfrom
cogvel:feat/mcp-tool-name

Conversation

@tdabasinskas
Copy link
Copy Markdown
Contributor

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 named root isn't very helpful.

@tdabasinskas tdabasinskas requested a review from a team as a code owner May 4, 2026 12:25
@tdabasinskas tdabasinskas force-pushed the feat/mcp-tool-name branch from 243dda8 to afc5818 Compare May 4, 2026 13:08
dgageot
dgageot previously approved these changes May 4, 2026
@dgageot
Copy link
Copy Markdown
Member

dgageot commented May 4, 2026

@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)
@tdabasinskas
Copy link
Copy Markdown
Contributor Author

@tdabasinskas not sure why, GitHub doesn't want to merge this one, because of hypothetical merge conflicts. Could you rebase?

Done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants