Skip to content

Conversation

@gpeal
Copy link
Collaborator

@gpeal gpeal commented Oct 18, 2025

This should make it more clear that specific tools come from MCP servers.

#4806 requested that we add the server name but we already do that.

Fixes #4806

@gpeal gpeal requested review from bolinfest and jif-oai October 18, 2025 01:28
@@ -1,4 +1,5 @@
/target/
/target-*/
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not technically related to this PR but I added "rust-analyzer.cargo.targetDir": "target-ide" to my vs code settings.json so terminal builds won't block on IDE updates after edits.

"{}{}{}",
tool.server_name, MCP_TOOL_NAME_DELIMITER, tool.tool_name
"mcp{}{}{}{}",
MCP_TOOL_NAME_DELIMITER, tool.server_name, MCP_TOOL_NAME_DELIMITER, tool.tool_name
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note the longer we make the tool name, the more likely we are to exceed MAX_TOOL_NAME_LENGTH and then we have to use the SHA-1 of the tool name instead, which is more opaque.

Is this worth it? And why does it matter whether a tool comes from an MCP or not? Is this for the agent or users?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It matters because users often references things as "notion mcp" etc in their prompt and there is also latent mcp knowledge in the model so the context is useful. There are numerous GitHub issues that Codex doesn't use mcp tools as well/often as other agents.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, let's give it a shot, then...

@gpeal gpeal merged commit 0170860 into main Oct 20, 2025
20 checks passed
@gpeal gpeal deleted the gpeal/mcp-tool-prefix branch October 20, 2025 00:41
@github-actions github-actions bot locked and limited conversation to collaborators Oct 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhance discoverablity of MCP tools

3 participants