-
Notifications
You must be signed in to change notification settings - Fork 19
Description
Feature Description
Adopt provider-prefixed tool names for all exposed MCP tools to ensure clear namespacing.
Problem Statement
When integrating multiple MCP (Model Context Protocol) servers from different providers, generic tool names can cause namespace collisions. The Glean MCP server currently registers tools with names like chat, company_search, and people_profile_search. This has proven to be problematic in both Gemini-CLI with Gemini-2.5-pro, Gemini-2.5-flash, and with claude-code (Sonnet, opus, opus 4.1)
If another registered MCP server also provides a tool named chat, it becomes ambiguous which service the agent should target. This leads to unpredictable behavior and makes it difficult for an LLM agent to reliably select the correct tool for a given task, degrading the stability of the overall system.
Additionally, while no fault of Glean, these mcp tools can be confusing to the LLM agents vs other on-disk tools.
While the current Model Context Protocol (MCP) specification does not strictly enforce a provider-prefix naming convention, it strongly recommends namespacing to ensure tool clarity and prevent collisions. The official documentation and community best practices point towards creating unique and descriptive tool names, with a URI-like structure being the suggested approach for robust namespacing.
Even the top level repo name "mcp-server" is somewhat problematic for developers consuming your repo, because it's a Glean mcp server, not a generic mcp server
Proposed Solution
To prevent these collisions, we propose prefixing all tool names with com.glean/ as according to the MCP standards recommendation. This creates a unique and explicit namespace for Glean's tools.
The current names would be changed as follows:
| Current Name | Proposed Name |
|---|---|
chat |
com.glean/chat |
company_search |
com.glean/company_search |
people_profile_search |
com.glean/people_profile_search |
read_documents |
com.glean/read_documents |
This change would make tool identification unambiguous and robust.
Alternatives Considered
One alternative is for each client to implement its own namespacing logic, wrapping the tools from each server upon registration. However, this approach is brittle and places an unnecessary burden on every consumer of the Glean MCP server. It is a standard best practice for the tool provider to ensure its tool names are reasonably unique to prevent such downstream issues.
I also considered simply hard forking the repo, but that doesn't really make sense because this package is only useful in conjunction with glean.
Additional Context
The current tool names were identified from the Glean MCP server's source code in references/mcpglean/packages/local-mcp-server/build/server.js. The file explicitly defines the following tool names:
company_searchpeople_profile_searchchatread_documents
This proposal aligns with common practices in other extensible systems where plugins or providers are expected to use unique prefixes for their commands, functions, or identifiers.
Impact
Implementing this feature would significantly improve the stability and predictability of using the Glean MCP server within a multi-agent, multi-tool environment. It would eliminate a class of integration errors, reduce confusion for the LLM agent, and allow for more seamless and scalable use of Glean's capabilities alongside other MCP-compliant services.