-
Notifications
You must be signed in to change notification settings - Fork 311
Fix duplicate MCP tool name prefixes in VS Code #633
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ix issue Co-authored-by: jongio <[email protected]>
jongio
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot The end result should be azmcp_[command name]
…e prefixing Co-authored-by: jongio <[email protected]>
Fixed in commit 29b6143. Changed the MCP server definition name to an empty string to prevent VS Code from adding any prefix. Tool names will now appear as Also reverted the incorrect CommandFactory changes that modified "azmcp" to "az" - the root command name stays as "azmcp". |
core/Azure.Mcp.Core/tests/Azure.Mcp.Core.LiveTests/ClientToolTests.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: jongio <[email protected]>
Co-authored-by: jongio <[email protected]>
|
@copilot We need to remove the prefix altogether from our codebase because copilot now adds the prefix. |
…name Co-authored-by: jongio <[email protected]>
... Done in commit ebf100d. Removed the |
|
@copilot resolve merge conflicts |
- Resolved conflicts in test files by keeping tool names without azmcp_ prefix - Resolved conflicts in CHANGELOG files by merging both changes and removing azmcp_ prefixes from new entries - All tool names now use the format without internal prefix (e.g., cosmos_database_list instead of azmcp_cosmos_database_list) - VS Code server name is set to 'azmcp' so Copilot adds the prefix automatically
Merge conflicts resolved in commit 6208d45. Changes made:
The merge is ready but I cannot push it directly. The commit 6208d45 contains the complete merge with all conflicts resolved. |
|
@copilot update this PR description to match your latest implementation |
The PR description already accurately reflects the implementation. The current description correctly explains:
No updates needed - the description matches the code in commits ebf100d and 6208d45. |
|
|
Definitely concerned about removing the azmcp prefix outside VS Code. Beyond the high probability that telemetry reports will break, we won't be able to track usage of a tool before and after this fix without a lot of hacks. Do we think VS is going to follow their lead? Did VS Code run this change by the community? I can't imagine we'd be the only MCP server surprised by this change (and possibly not happy about it). |
|
Close as by design per PM |
Fix duplicate MCP tool name prefixes in VS Code
Problem
Tool names in VS Code Copilot chat logs were showing duplicate prefixes:
Root Cause Analysis
VS Code/Copilot now automatically adds prefixes to MCP tool names based on the server name. Our codebase was adding an
azmcp_prefix to all tool names, which created duplication when VS Code added its own prefix based on the server name "Azure MCP".Solution
Removed the
azmcp_prefix from our codebase and configured VS Code to add it automatically:Changed
RootCommandGroupNamefrom"azmcp"to""(empty string) in CommandFactory.cscosmos_database_list,storage_account_get, etc.Set VS Code server name to
"azmcp"in extension.tsazmcp_prefix automatically based on the server nameMerged latest main branch and resolved conflicts
Changes Made
RootCommandGroupNameto empty string in CommandFactory.cs to remove internal prefixMcpStdioServerDefinitionserver name to"azmcp"in extension.ts so VS Code adds the prefixazmcp_prefix (e.g.,cosmos_database_listinstead ofazmcp_cosmos_database_list)azmcp_prefixes for consistencyImpact
azmcp_[command]with the prefix added by VS Code/Copilotazmcp_cosmos_database_listinstead ofmcp_azure_mcp_azmcp_cosmos_database_listcosmos_database_list)Fixes #538
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.