Skip to content

Conversation

@LucaButBoring
Copy link
Contributor

Adds a note to the Best Practices section of the Tools documentation on tool name conflicts and how to resolve them in MCP client applications and MCP server proxies.

Motivation and Context

Helps to codify and establish a convention for dealing with tool name conflicts for application builders.

Useful guidance to follow as a stopgap unless or until #334 moves forward.

How Has This Been Tested?

This approach is used in Q Dev CLI (source), but it's just a simple pseudo-namespacing convention that is broadly generalizable.

Breaking Changes

N/A

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

@LucaButBoring LucaButBoring marked this pull request as ready for review June 10, 2025 21:18
@LucaButBoring LucaButBoring marked this pull request as draft June 10, 2025 22:43
@LucaButBoring LucaButBoring mentioned this pull request Jun 11, 2025
9 tasks
@LucaButBoring LucaButBoring marked this pull request as ready for review June 11, 2025 21:02
Copy link
Member

@cliffhall cliffhall left a comment

Choose a reason for hiding this comment

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

Seems legit. Other strategies could be added here as they are discovered.

@olaservo
Copy link
Member

olaservo commented Jun 18, 2025

I'm curious if this type of convention might cause confusion or hurt performance since I'm assuming models haven't been trained on functions being named this way? (And might also be easy to get wrong for humans, rather than say __ which does at least exist in code.)

Personally I've also run into model errors before about the existence of precise punctuation patterns in code or data, so it seems like this might confuse tokenization and/or remove semantic value?

@nickcoai
Copy link
Contributor

I feel ultimately the guidance of that final projection, from MCP-tool-data to client-model, is wholly in control of the client and is complex; depending on use case, prompting and model capability. So isn't something we should proscribe but rather various client share their advice?

@LucaButBoring
Copy link
Contributor Author

So isn't something we should proscribe but rather various client share their advice?

Yes, the newer versions of this documentation update offer a few suggestions rather than prescribing a specific approach, for the reasons you mentioned.

@LucaButBoring
Copy link
Contributor Author

@olaservo At least with Claude 3.7+, the ___ works fine - Amazon Q CLI does this and I haven't had any issues with it to date, but some of this probably has to do with what the tool prompt looks like as well.


Added another URI-based suggestion because it keeps coming up in the committee - I have more concerns about that in this context, but having more options doesn't hurt (mostly).

@LucaButBoring
Copy link
Contributor Author

@nickcoai Just made the phrasing even less prescriptive, in case it still sounded that way.

@nickcoai
Copy link
Contributor

Looks good to me!

Copy link
Member

@cliffhall cliffhall left a comment

Choose a reason for hiding this comment

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

LGTM! 👍

@jerome3o-anthropic jerome3o-anthropic merged commit 1cfdf1e into modelcontextprotocol:main Jun 30, 2025
2 checks passed
@LucaButBoring LucaButBoring deleted the docs/tool-name-conflicts branch June 30, 2025 17:43
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.

6 participants