Skip to content

Conversation

@anannya03
Copy link
Contributor

@anannya03 anannya03 commented Oct 18, 2025

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-
image

GitHub issue number?

#842

Pre-merge Checklist

  • Required for All PRs
    • Read contribution guidelines
    • PR title clearly describes the change
    • Commit history is clean with descriptive messages (cleanup guide)
    • Added comprehensive tests for new/modified functionality
    • Updated servers/Azure.Mcp.Server/CHANGELOG.md and/or servers/Fabric.Mcp.Server/CHANGELOG.md for product changes (features, bug fixes, UI/UX, updated dependencies)
  • For MCP tool changes:
    • One tool per PR: This PR adds or modifies only one MCP tool for faster review cycles
    • Updated servers/Azure.Mcp.Server/README.md and/or servers/Fabric.Mcp.Server/README.md documentation
    • Validate README.md changes using script at eng/scripts/Process-PackageReadMe.ps1. See Package README
    • Updated command list in /servers/Azure.Mcp.Server/docs/azmcp-commands.md and/or /docs/fabric-commands.md
    • For new or modified tool descriptions, ran ToolDescriptionEvaluator and obtained a score of 0.4 or more and a top 3 ranking for all related test prompts
    • For new tools associated with Azure services or publicly available tools/APIs/products, add URL to documentation in the PR description
  • Extra steps for Azure MCP Server tool changes:
    • Updated test prompts in /servers/Azure.Mcp.Server/docs/e2eTestPrompts.md
    • 👉 For Community (non-Microsoft team member) PRs:
      • Security review: Reviewed code for security vulnerabilities, malicious code, or suspicious activities before running tests (crypto mining, spam, data exfiltration, etc.)
      • Manual tests run: added comment /azp run mcp - pullrequest - live to run Live Test Pipeline

Copy link
Contributor

Copilot AI left a 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.

@github-project-automation github-project-automation bot moved this from Untriaged to In Progress in Azure MCP Server Oct 20, 2025
@joshfree joshfree added server-Azure.Mcp Azure.Mcp.Server tools-Core AZMCP Core functionality that all other tools build on top of labels Oct 20, 2025
@joshfree joshfree added this to the 2025-10 milestone Oct 20, 2025
@anannya03 anannya03 force-pushed the limit_tool_name_length branch from 0db18d4 to cd99fb7 Compare October 20, 2025 19:09
@hallipr
Copy link
Member

hallipr commented Oct 20, 2025

approving for eng/ script changes

Copy link
Member

@joshfree joshfree left a 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

@anannya03 anannya03 enabled auto-merge (squash) October 21, 2025 02:45
@anannya03 anannya03 merged commit 10d1293 into microsoft:main Oct 21, 2025
25 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Azure MCP Server Oct 21, 2025
colbytimm pushed a commit to colbytimm/microsoft-mcp that referenced this pull request Dec 8, 2025
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

server-Azure.Mcp Azure.Mcp.Server tools-Core AZMCP Core functionality that all other tools build on top of

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants