Skip to content

Commit 1cfdf1e

Browse files
Merge pull request modelcontextprotocol#701 from LucaButBoring/docs/tool-name-conflicts
docs(tools): discuss tool name conflicts and how to resolve them
2 parents 169021c + 8618175 commit 1cfdf1e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs/docs/concepts/tools.mdx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,18 @@ When implementing tools:
213213
9. Consider rate limiting for resource-intensive operations
214214
10. Log tool usage for debugging and monitoring
215215

216+
### Tool name conflicts
217+
218+
MCP client applications and MCP server proxies may encounter tool name conflicts when building their own tool lists. For example, two connected MCP servers `web1` and `web2` may both expose a tool named `search_web`.
219+
220+
Applications may disambiguiate tools with one of the following strategies (among others; not an exhaustive list):
221+
222+
- Concatenating a unique, user-defined server name with the tool name, e.g. `web1___search_web` and `web2___search_web`. This strategy may be preferable when unique server names are already provided by the user in a configuration file.
223+
- Generating a random prefix for the tool name, e.g. `jrwxs___search_web` and `6cq52___search_web`. This strategy may be preferable in server proxies where user-defined unique names are not available.
224+
- Using the server URI as a prefix for the tool name, e.g. `web1.example.com:search_web` and `web2.example.com:search_web`. This strategy may be suitable when working with remote MCP servers.
225+
226+
Note that the server-provided name from the initialization flow is not guaranteed to be unique and is not generally suitable for disambiguation purposes.
227+
216228
## Security considerations
217229

218230
When exposing tools:

0 commit comments

Comments
 (0)