Add CI test to validate Azure MCP tool names in skill markdown files#1709
Add CI test to validate Azure MCP tool names in skill markdown files#1709
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 - 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>
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
| serverProcess.on("close", () => clearTimeout(timeoutHandle)); | ||
|
|
||
| // Unref the child process so it doesn't prevent the Jest worker from exiting | ||
| serverProcess.unref(); |
There was a problem hiding this comment.
If the npx @azure/mcp@latest server start process exits early (e.g., download failure, missing runtime), this promise currently waits until the 110s timeout before failing, which slows CI and hides the underlying exit reason. Consider capturing stderr/stdout and rejecting immediately in the close handler when the process exits before a tools/list response is received (include exit code/signal and last stderr lines for diagnostics).
There was a problem hiding this comment.
Done in commit 26d67d8. The close handler now rejects immediately when the process exits before a tools/list response is received, including the exit code, signal, and last 20 lines of stderr. A settled flag guards all paths (success, error event, timeout, and early close) against double-resolution.
|
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>
Skill markdown files reference Azure MCP tools by name, but there was no automated check to catch stale or mistyped tool names that don't match what the server actually exposes.
Changes
New test
tests/skills-validation/mcp-tool-names.test.ts— unit test that runs as part of the existingtest:unitsuite (picked up by thetest-all-skills.ymlCI workflow). It:@azure/mcp@latestand queries the live tool list via JSON-RPCtools/list.mdfiles underplugin/skills/for two naming conventions:mcp_azure_mcp_<tool>(GitHub Copilot MCP tool reference format)azure__<tool>(alternative format)Bug fixes in 9 MD files — discovered by the new test:
mcp_azure_mcp_get_bestpracticesis not a real tool; the correct name ismcp_azure_mcp_get_azure_bestpractices. Fixed acrossazure-upgrade,azure-cloud-migrate, andazure-prepareskill reference files.Failure output example
When a file references a non-existent tool, the test produces:
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
centralus-2.in.applicationinsights.azure.com/home/REDACTED/.npm/_npx/541454632b79112e/node_modules/@azure/mcp-linux-x64/dist/azmcp /home/REDACTED/.npm/_npx/541454632b79112e/node_modules/@azure/mcp-linux-x64/dist/azmcp server start(dns block)/home/REDACTED/.npm/_npx/541454632b79112e/node_modules/@azure/mcp-linux-x64/dist/azmcp /home/REDACTED/.npm/_npx/541454632b79112e/node_modules/@azure/mcp-linux-x64/dist/azmcp server start grep -l t_bestpractices ure/plugin/skills/azure-compliance/references/azure-quick-review.md ure/tests/node_modules/.bin/sh t_bestpractices otnet.md rgo/bin/grep grep -l overage b-Copilot-for-Azure/plugin/skills/azure-deploy/references/recipes/cicd/verify.md ep t_bestpractices nces/ptu-guide.m-c k/_temp/ghcca-no"jest" '--testPathIgnorePatterns=node_modules|_template|integration' grep(dns block)/home/REDACTED/.npm/_npx/541454632b79112e/node_modules/@azure/mcp-linux-x64/dist/azmcp /home/REDACTED/.npm/_npx/541454632b79112e/node_modules/@azure/mcp-linux-x64/dist/azmcp server start grep ure/�� t_bestpractices b-Copilot-for-Azure/plugin/skills/azure-deploy/references/recipes/terraform/errors.md de/node/bin/grep t_bestpractices md ndor/bin/grep grep ure/�� d .md modules/@npmcli/run-script/lib/node-gyp-bin/npx t_bestpractices d grep grep(dns block)westus-0.in.applicationinsights.azure.com/home/REDACTED/.npm/_npx/541454632b79112e/node_modules/@azure/mcp-linux-x64/dist/azmcp /home/REDACTED/.npm/_npx/541454632b79112e/node_modules/@azure/mcp-linux-x64/dist/azmcp server start(dns block)/home/REDACTED/.npm/_npx/541454632b79112e/node_modules/@azure/mcp-linux-x64/dist/azmcp /home/REDACTED/.npm/_npx/541454632b79112e/node_modules/@azure/mcp-linux-x64/dist/azmcp server start grep -l t_bestpractices ure/plugin/skills/azure-compliance/references/azure-quick-review.md ure/tests/node_modules/.bin/sh t_bestpractices otnet.md rgo/bin/grep grep -l overage b-Copilot-for-Azure/plugin/skills/azure-deploy/references/recipes/cicd/verify.md ep t_bestpractices nces/ptu-guide.m-c k/_temp/ghcca-no"jest" '--testPathIgnorePatterns=node_modules|_template|integration' grep(dns block)/home/REDACTED/.npm/_npx/541454632b79112e/node_modules/@azure/mcp-linux-x64/dist/azmcp /home/REDACTED/.npm/_npx/541454632b79112e/node_modules/@azure/mcp-linux-x64/dist/azmcp server start grep ure/�� t_bestpractices b-Copilot-for-Azure/plugin/skills/azure-deploy/references/recipes/terraform/errors.md de/node/bin/grep t_bestpractices md ndor/bin/grep grep ure/�� d .md modules/@npmcli/run-script/lib/node-gyp-bin/npx t_bestpractices d grep grep(dns block)If you need me to access, download, or install something from one of these locations, you can either: