-
Notifications
You must be signed in to change notification settings - Fork 343
Check for tool name length #881
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
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.
Pull Request Overview
Adds a validation script to enforce a maximum MCP tool name length and shortens several existing tool and subgroup command names to comply. Key changes adjust command/group identifiers (e.g., filesystem -> file, sessionhost -> session, gethealth -> get) and update corresponding docs, prompts, and codeowners.
- Introduces Test-ToolNameLength.ps1 and integrates it into Analyze-Code.ps1.
- Renames multiple command groups and tool command names to reduce length.
- Updates documentation, prompts, and CODEOWNERS to reflect renamed commands.
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| VirtualDesktopSetup.cs | Renames subgroup token from sessionhost to session. |
| SessionHostUserSessionListCommand.cs | Shortens command name usersession-list to user_list. |
| ResourceHealthSetup.cs | Renames subgroup token from service-health-events to health-events. |
| AvailabilityStatusGetCommand.cs | Updates description to reference new monitor healthmodels entity get tool name. |
| EntityGetHealthCommand.cs | Shortens command name constant from gethealth to get. |
| ManagedLustreSetup.cs | Renames subgroup token filesystem to file. |
| e2eTestPrompts.md | Updates test prompt tool names to match shortened identifiers. |
| azmcp-commands.md | Updates CLI examples to new tool/group names. |
| prompts.json | Adjusts keys to new shortened tool names. |
| Test-ToolNameLength.ps1 | Adds new script enforcing max tool name length. |
| Analyze-Code.ps1 | Integrates tool name length validation into analysis workflow. |
| cspell.json | Removes obsolete gethealth spelling entry. |
| CODEOWNERS | Adds ownership entries for ResourceHealth but with mismatched PRLabel comment. |
tools/Azure.Mcp.Tools.Monitor/src/Commands/HealthModels/Entity/EntityGetHealthCommand.cs
Show resolved
Hide resolved
0db18d4 to
cd99fb7
Compare
|
approving for eng/ script changes |
joshfree
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.
Looks good except the invalid alias in CODEOWNERS due to the extra space. Please fix that either with this PR or a follow on PR
* Check for tool name length * modified script * addressed review comments * fixed live tests and md docs * script change * changed script. (includes long tool names to test CI) * fixed the incorrect tool names * script fix * added changelog * Supports multiple servers * changed warning message * Remove spaces in CODEOWNERS file entries
What does this PR do?
This PR introduces a CI validation step to ensure that all MCP tool names (excluding the MCP server name prefix) do not exceed 48 characters, preventing failures in Copilot CLI due to tool names that are too long.
Modified the tool names of a few tools which were violating this limit.
Validation Result-

GitHub issue number?
#842
Pre-merge Checklist
servers/Azure.Mcp.Server/CHANGELOG.mdand/orservers/Fabric.Mcp.Server/CHANGELOG.mdfor product changes (features, bug fixes, UI/UX, updated dependencies)servers/Azure.Mcp.Server/README.mdand/orservers/Fabric.Mcp.Server/README.mddocumentationeng/scripts/Process-PackageReadMe.ps1. See Package README/servers/Azure.Mcp.Server/docs/azmcp-commands.mdand/or/docs/fabric-commands.mdToolDescriptionEvaluatorand obtained a score of0.4or more and a top 3 ranking for all related test prompts/servers/Azure.Mcp.Server/docs/e2eTestPrompts.mdcrypto mining, spam, data exfiltration, etc.)/azp run mcp - pullrequest - liveto run Live Test Pipeline