Change tool names to use dash instead of underscore#1727
Change tool names to use dash instead of underscore#1727conniey wants to merge 5 commits intomicrosoft:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request changes tool names in the Azure Best Practices toolset from using underscores to dashes, aligning with the naming conventions documented in new-command.md. The changes affect two components: the area name "get_azure_bestpractices" becomes "get-azure-bestpractices", and the command name "ai_app" becomes "ai-app".
Changes:
- Changed area name from "get_azure_bestpractices" to "get-azure-bestpractices" in AzureBestPracticesSetup.cs
- Changed command name from "ai_app" to "ai-app" in AIAppBestPracticesCommand.cs
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| tools/Azure.Mcp.Tools.AzureBestPractices/src/AzureBestPracticesSetup.cs | Updates area name to use dashes instead of underscores, affecting both commands in this area |
| tools/Azure.Mcp.Tools.AzureBestPractices/src/Commands/AIAppBestPracticesCommand.cs | Updates command name to use dashes instead of underscores |
| public override string Id => "6c29659e-406d-4b9b-8150-e3d4fd7ba31c"; | ||
|
|
||
| public override string Name => "ai_app"; | ||
| public override string Name => "ai-app"; |
There was a problem hiding this comment.
The tool name change from "ai_app" to "ai-app" requires updates to several other files that were not included in this PR. The full tool name uses the pattern: {area_name}{command_name}, where underscore is the separator (CommandFactory.Separator = ''). Since the area name is "get-azure-bestpractices" and the command name is now "ai-app", the full tool name should be "get-azure-bestpractices_ai-app".
The following files still reference the old tool name and need to be updated:
- consolidated-tools.json (line 1073): "get_azure_bestpractices_ai_app" → "get-azure-bestpractices_ai-app"
- prompts.json (line 546): Key "get_azure_bestpractices_ai_app" → "get-azure-bestpractices_ai-app"
- azmcp-commands.md (lines 1516, 1519): "ai_app" → "ai-app"
- e2eTestPrompts.md (lines 530-534): "get_azure_bestpractices_ai_app" → "get-azure-bestpractices_ai-app"
- AIAppBestPracticesCommandTests.cs (line 60): The assertion expects "ai_app" but should expect "ai-app"
All references must be updated to maintain consistency and ensure the tool can be properly invoked.
| public class AzureBestPracticesSetup : IAreaSetup | ||
| { | ||
| public string Name => "get_azure_bestpractices"; | ||
| public string Name => "get-azure-bestpractices"; |
There was a problem hiding this comment.
The area name change from "get_azure_bestpractices" to "get-azure-bestpractices" is a breaking change that must be documented in CHANGELOG.md. The full tool names are changing from "get_azure_bestpractices_" to "get-azure-bestpractices_" (note: the separator between area and command is underscore, but the area name itself now uses dashes).
This affects two tools:
- "get_azure_bestpractices_ai_app" → "get-azure-bestpractices_ai-app"
- "get_azure_bestpractices_get" → "get-azure-bestpractices_get"
The PR checklist specifically requires updating CHANGELOG.md for product changes. This breaking change should be added to the "## 2.0.0-beta.20 (Unreleased)" section under "### Breaking Changes".
| public string Name => "get-azure-bestpractices"; | |
| public string Name => "get_azure_bestpractices"; |
| public class AzureBestPracticesSetup : IAreaSetup | ||
| { | ||
| public string Name => "get_azure_bestpractices"; | ||
| public string Name => "get-azure-bestpractices"; |
There was a problem hiding this comment.
The area name change from "get_azure_bestpractices" to "get-azure-bestpractices" also affects the other command in this area. The "get" command's full tool name changes from "get_azure_bestpractices_get" to "get-azure-bestpractices_get".
The following files reference "get_azure_bestpractices_get" and need to be updated:
- consolidated-tools.json (line 1074): "get_azure_bestpractices_get" → "get-azure-bestpractices_get"
- prompts.json (line 553): Key "get_azure_bestpractices_get" → "get-azure-bestpractices_get"
- e2eTestPrompts.md (lines 521-529): All references to "get_azure_bestpractices_get" → "get-azure-bestpractices_get"
These updates are necessary consequences of changing the area name, even though the command name itself ("get") is not changing.
b949e8a to
b2984d8
Compare
What does this PR do?
Changes tool names to use
-instead of_to follow naming rules in new-command.md. Updates:ai_apptoai-appazure_best_practicestoazure-best-practicesRelated #1592
GitHub issue number?
Fixes #1566
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.md.\eng\scripts\Update-AzCommandsMetadata.ps1to update tool metadata in azmcp-commands.md (required for CI)ToolDescriptionEvaluatorand obtained a score of0.4or more and a top 3 ranking for all related test promptsconsolidated-tools.json/servers/Azure.Mcp.Server/docs/e2eTestPrompts.mdcrypto mining, spam, data exfiltration, etc.)/azp run mcp - pullrequest - liveto run Live Test Pipeline