To integrate tools from MCP Servers into the prompt sent of to the LLM, GitHub Copilot creates names for each of them and puts them into availableDeferredTools in the system prompt. It seems like these names are constructed from MCP Server name (as put into mcp.json + tool name (as announced by the MCP server).
For servers of the MCP Registry, especially if the registry is enforced as an allowlist, the server name must follow the MCP Registry spec, so typically something like io.github.{owner}/{repo} (when the github-based authentication is used). Compare also https://modelcontextprotocol.io/registry/authentication
This leads to an unfortunate situation for the generated tool names. For the MCP Server io.github.upstash/context7, they would be something like mcp_io_github_upstash_context7_resolve_library_id, which is already confusing since most tools will now have a name that includes "github". Except it's even worse, since there's some additional length-based cropping going on so that the actual tool name is mcp_io_github_ups_resolve_library_id, which as you can see, doesn't include context7 at all anymore.
As a consequence, the LLM doesn't know to use the tool, and we have a problem.
I understand the need to not bloat the context window with MCP Servers too much, but the current situation with conflicting naming strategies creates a problem. Perhaps a quick solution would be to base the name of the availableDeferredTools not on the config, but on the server-announced title of the MCP server, falling back to the name.
- Copilot Chat Extension Version: 0.38.1
- VS Code Version: 1.110.0
- Feature (e.g. agent/edit/ask mode): agent
- Selected model (e.g. GPT 4.1, Claude 3.7 Sonnet): Claude 4.5 Opus
Steps to Reproduce:
- Add an MCP Server like Context7 with it's MCP Registry-compliant server name
- Check the system prompt in the chat debug view for
availableDeferredTools
To integrate tools from MCP Servers into the prompt sent of to the LLM, GitHub Copilot creates names for each of them and puts them into
availableDeferredToolsin the system prompt. It seems like these names are constructed from MCP Server name (as put intomcp.json+ tool name (as announced by the MCP server).For servers of the MCP Registry, especially if the registry is enforced as an allowlist, the server name must follow the MCP Registry spec, so typically something like
io.github.{owner}/{repo}(when the github-based authentication is used). Compare also https://modelcontextprotocol.io/registry/authenticationThis leads to an unfortunate situation for the generated tool names. For the MCP Server
io.github.upstash/context7, they would be something likemcp_io_github_upstash_context7_resolve_library_id, which is already confusing since most tools will now have a name that includes "github". Except it's even worse, since there's some additional length-based cropping going on so that the actual tool name ismcp_io_github_ups_resolve_library_id, which as you can see, doesn't includecontext7at all anymore.As a consequence, the LLM doesn't know to use the tool, and we have a problem.
I understand the need to not bloat the context window with MCP Servers too much, but the current situation with conflicting naming strategies creates a problem. Perhaps a quick solution would be to base the name of the
availableDeferredToolsnot on the config, but on the server-announced title of the MCP server, falling back to the name.Steps to Reproduce:
availableDeferredTools