Add CI test to validate Azure MCP tool names in skill markdown files#1709
Merged
saikoumudi merged 20 commits intomainfrom Apr 18, 2026
Merged
Add CI test to validate Azure MCP tool names in skill markdown files#1709saikoumudi merged 20 commits intomainfrom
saikoumudi merged 20 commits intomainfrom
Conversation
…eferences Agent-Logs-Url: https://github.com/microsoft/GitHub-Copilot-for-Azure/sessions/362a2400-266c-4070-9a8b-625601205ea3 Co-authored-by: kvenkatrajan <102772054+kvenkatrajan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add CI tests for validating Azure MCP tool names in markdown files
Add CI test to validate Azure MCP tool names in skill markdown files
Apr 3, 2026
Collaborator
|
@copilot - bump the version on 'azure-cloud-migrate' , 'azure-prepare', 'azure-upgrade' skills |
…de skills Agent-Logs-Url: https://github.com/microsoft/GitHub-Copilot-for-Azure/sessions/5a67a30f-b6d1-43a9-8c38-a2ad05209e1b Co-authored-by: kvenkatrajan <102772054+kvenkatrajan@users.noreply.github.com>
Contributor
Author
Contributor
There was a problem hiding this comment.
Pull request overview
Adds automated validation to ensure Azure MCP tool names referenced in skill markdown stay in sync with the tools actually exposed by @azure/mcp, and fixes existing stale tool references found by that validation.
Changes:
- Add a new unit test that boots
@azure/mcpand validates referenced Azure MCP tool names acrossplugin/skills/**/*.md. - Fix stale tool references (
get_bestpractices→get_azure_bestpractices) across affected skill docs. - Update azure-upgrade and azure-cloud-migrate SKILL tool lists/usages to the corrected tool name.
Show a summary per file
| File | Description |
|---|---|
| tests/skills-validation/mcp-tool-names.test.ts | New unit test that queries Azure MCP tools/list and validates tool references in skill markdown. |
| plugin/skills/azure-upgrade/SKILL.md | Fixes Azure MCP best-practices tool name in rules/tool table. |
| plugin/skills/azure-upgrade/references/services/functions/assessment.md | Fixes best-practices tool reference in tip. |
| plugin/skills/azure-upgrade/references/global-rules.md | Fixes best-practices tool reference in global rules. |
| plugin/skills/azure-prepare/references/recipes/terraform/README.md | Fixes best-practices tool reference in Terraform recipe table. |
| plugin/skills/azure-prepare/references/recipes/azcli/README.md | Fixes best-practices tool reference in Azure CLI recipe table. |
| plugin/skills/azure-cloud-migrate/SKILL.md | Fixes Azure MCP best-practices tool name in rules. |
| plugin/skills/azure-cloud-migrate/references/services/functions/global-rules.md | Fixes best-practices tool reference in rules. |
| plugin/skills/azure-cloud-migrate/references/services/functions/code-migration.md | Fixes best-practices tool reference in prerequisites/steps. |
| plugin/skills/azure-cloud-migrate/references/services/functions/assessment.md | Fixes best-practices tool reference in tip. |
Copilot's findings
- Files reviewed: 11/11 changed files
- Comments generated: 3
Collaborator
|
Fixes #778 |
Agent-Logs-Url: https://github.com/microsoft/GitHub-Copilot-for-Azure/sessions/bfd49079-1961-4c4e-b89f-d5e1a195b0ac Co-authored-by: kvenkatrajan <102772054+kvenkatrajan@users.noreply.github.com>
jongio
reviewed
Apr 8, 2026
Collaborator
jongio
left a comment
There was a problem hiding this comment.
The approach works well - validating tool names against the live server catches drift that's hard to spot manually, and the 9 fixes prove the test's value.
Three suggestions on the test implementation, plus a note that the PR currently has merge conflicts to resolve.
…mes test Agent-Logs-Url: https://github.com/microsoft/GitHub-Copilot-for-Azure/sessions/3db4fef5-f378-4506-83b4-7a2f8ee1c5d4 Co-authored-by: kvenkatrajan <102772054+kvenkatrajan@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Agent-Logs-Url: https://github.com/microsoft/GitHub-Copilot-for-Azure/sessions/776538a2-cde8-4dfe-a517-2e4a379768f0 Co-authored-by: kvenkatrajan <102772054+kvenkatrajan@users.noreply.github.com>
Agent-Logs-Url: https://github.com/microsoft/GitHub-Copilot-for-Azure/sessions/e6709d33-cd52-4a46-a86c-fcd62e12ed33 Co-authored-by: kvenkatrajan <102772054+kvenkatrajan@users.noreply.github.com>
saikoumudi
previously approved these changes
Apr 17, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
kvenkatrajan
approved these changes
Apr 18, 2026
saikoumudi
approved these changes
Apr 18, 2026
Closed
Ba4bes
pushed a commit
to Ba4bes/GitHub-Copilot-for-Azure
that referenced
this pull request
Apr 24, 2026
…icrosoft#1709) * Initial plan * Add CI test for Azure MCP tool name validation and fix invalid tool references Agent-Logs-Url: https://github.com/microsoft/GitHub-Copilot-for-Azure/sessions/362a2400-266c-4070-9a8b-625601205ea3 Co-authored-by: kvenkatrajan <102772054+kvenkatrajan@users.noreply.github.com> * Bump versions for azure-cloud-migrate, azure-prepare, and azure-upgrade skills Agent-Logs-Url: https://github.com/microsoft/GitHub-Copilot-for-Azure/sessions/5a67a30f-b6d1-43a9-8c38-a2ad05209e1b Co-authored-by: kvenkatrajan <102772054+kvenkatrajan@users.noreply.github.com> * Reject early on MCP server process exit with stderr diagnostics Agent-Logs-Url: https://github.com/microsoft/GitHub-Copilot-for-Azure/sessions/bfd49079-1961-4c4e-b89f-d5e1a195b0ac Co-authored-by: kvenkatrajan <102772054+kvenkatrajan@users.noreply.github.com> * Add shell:true to spawn and defensive pagination check in mcp-tool-names test Agent-Logs-Url: https://github.com/microsoft/GitHub-Copilot-for-Azure/sessions/3db4fef5-f378-4506-83b4-7a2f8ee1c5d4 Co-authored-by: kvenkatrajan <102772054+kvenkatrajan@users.noreply.github.com> * refactor: replace live MCP server with static azure-mcp-tools.json snapshot in unit test - Add tests/skills-validation/azure-mcp-tools.json with current tool list from @azure/mcp - Refactor mcp-tool-names.test.ts to read from snapshot (fast, offline, deterministic) - Remove spawn/child_process dependency, 120s beforeAll timeout, and live server logic - Test now completes in ~2s instead of up to 2 minutes Agent-Logs-Url: https://github.com/microsoft/GitHub-Copilot-for-Azure/sessions/123eec45-bcc4-4e61-815f-89ffe090b2da Co-authored-by: kvenkatrajan <102772054+kvenkatrajan@users.noreply.github.com> * chore: bump azure-prepare version to 1.1.8 Agent-Logs-Url: https://github.com/microsoft/GitHub-Copilot-for-Azure/sessions/770aa1df-9beb-4d56-92d3-4e3118fce322 Co-authored-by: kvenkatrajan <102772054+kvenkatrajan@users.noreply.github.com> * chore: set azure-prepare version to 1.1.21 Agent-Logs-Url: https://github.com/microsoft/GitHub-Copilot-for-Azure/sessions/7aeb6af7-773c-49e8-ae3d-d3a3de0dad4e Co-authored-by: kvenkatrajan <102772054+kvenkatrajan@users.noreply.github.com> * chore: bump azure-cloud-migrate version to 1.0.3 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Update tests/skills-validation/azure-mcp-tools.json Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update tests/skills-validation/mcp-tool-names.test.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * refactor: use canonical snapshot in mcp-tool-names test, remove duplicate azure-mcp-tools.json Agent-Logs-Url: https://github.com/microsoft/GitHub-Copilot-for-Azure/sessions/1b208d96-74e8-4944-99d7-8f8d86bd97c4 Co-authored-by: kvenkatrajan <102772054+kvenkatrajan@users.noreply.github.com> * refactor: consolidate MCP tool name validation into single test Address Jon's feedback (r3103830005): - Add azure__<tool> regex pattern to tests/mcp-tool-references/unit.test.ts so both naming conventions validate against the one auto-refreshed snapshot - Delete tests/skills-validation/mcp-tool-names.test.ts (duplicate test) - Include line numbers in failure output for easier debugging - Keep get_bestpractices alias (still referenced in azure-cost skill) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Potential fix for pull request finding 'CodeQL / Unused variable, import, function or class' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Update tests/mcp-tool-references/unit.test.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * test: validate snapshot shape before using toolNames in beforeAll Agent-Logs-Url: https://github.com/microsoft/GitHub-Copilot-for-Azure/sessions/776538a2-cde8-4dfe-a517-2e4a379768f0 Co-authored-by: kvenkatrajan <102772054+kvenkatrajan@users.noreply.github.com> * test: tighten Azure MCP reference token extraction and validation Agent-Logs-Url: https://github.com/microsoft/GitHub-Copilot-for-Azure/sessions/e6709d33-cd52-4a46-a86c-fcd62e12ed33 Co-authored-by: kvenkatrajan <102772054+kvenkatrajan@users.noreply.github.com> * chore: bump azure-prepare version to 1.1.22 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: kvenkatrajan <102772054+kvenkatrajan@users.noreply.github.com> Co-authored-by: Kay Venkatrajan <kvenkatrajan@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds automated validation to ensure Azure MCP tool names referenced in skill markdown stay in sync with the tools actually exposed by
@azure/mcp, and fixes existing stale tool references found by that validation.Changes:
tests/mcp-tool-references/unit.test.tsto validate bothmcp_azure_mcp_<tool>andazure__<tool>naming conventions against the canonical snapshot attests/fixtures/azure-mcp-tool-names.snapshot.json.get_bestpractices→get_azure_bestpractices) across affected skill docs.tests/mcp-tool-references/unit.test.tsmcp_azure_mcp_*andazure__*tool references with line-number diagnostics.plugin/skills/azure-upgrade/SKILL.mdplugin/skills/azure-upgrade/references/services/functions/assessment.mdplugin/skills/azure-upgrade/references/global-rules.mdplugin/skills/azure-prepare/references/recipes/terraform/README.mdplugin/skills/azure-prepare/references/recipes/azcli/README.mdplugin/skills/azure-cloud-migrate/SKILL.mdplugin/skills/azure-cloud-migrate/references/services/functions/global-rules.mdplugin/skills/azure-cloud-migrate/references/services/functions/code-migration.mdplugin/skills/azure-cloud-migrate/references/services/functions/assessment.md