diff --git a/tests/fixtures/azure-mcp-tool-names.snapshot.json b/tests/fixtures/azure-mcp-tool-names.snapshot.json index c8f92bad8..2d54618ad 100644 --- a/tests/fixtures/azure-mcp-tool-names.snapshot.json +++ b/tests/fixtures/azure-mcp-tool-names.snapshot.json @@ -1,5 +1,6 @@ { "source": "npx -y @azure/mcp server start (initialize + tools/list)", + "toolReferenceConvention": "References must match exact tool names from toolNames. Compound forms like _* are not supported.", "azureMcpVersion": "3.0.0-beta.3+ae9594a1268710e678c0a6c9f9801212b1ee3694", "toolNames": [ "acr", diff --git a/tests/mcp-tool-references/unit.test.ts b/tests/mcp-tool-references/unit.test.ts index 7099841f2..ccc302a61 100644 --- a/tests/mcp-tool-references/unit.test.ts +++ b/tests/mcp-tool-references/unit.test.ts @@ -56,13 +56,6 @@ describe("Azure MCP tool references in skill markdown", () => { continue; } - const hasValidNamespacePrefix = snapshot.toolNames.some((snapshotToolName) => - resolvedToolName.startsWith(`${snapshotToolName}_`), - ); - if (hasValidNamespacePrefix) { - continue; - } - const relativePath = path.relative(skillsRoot, markdownPath); unknownReferences.push(`${toolReference} (${relativePath})`); } @@ -74,11 +67,15 @@ describe("Azure MCP tool references in skill markdown", () => { test("snapshot file exists and has expected shape", () => { const snapshot = JSON.parse(readFileSync(snapshotPath, "utf8")) as { source?: string; + toolReferenceConvention?: string; azureMcpVersion?: string; toolNames?: string[]; }; expect(typeof snapshot.source).toBe("string"); + expect(snapshot.toolReferenceConvention).toBe( + "References must match exact tool names from toolNames. Compound forms like _* are not supported.", + ); expect(typeof snapshot.azureMcpVersion).toBe("string"); expect(Array.isArray(snapshot.toolNames)).toBe(true); expect(snapshot.toolNames?.length).toBeGreaterThan(0); diff --git a/tests/scripts/update-mcp-tool-snapshot.js b/tests/scripts/update-mcp-tool-snapshot.js index 2fc22836a..eb8ebdcb1 100644 --- a/tests/scripts/update-mcp-tool-snapshot.js +++ b/tests/scripts/update-mcp-tool-snapshot.js @@ -137,6 +137,8 @@ async function main() { const snapshot = { source: "npx -y @azure/mcp server start (initialize + tools/list)", + toolReferenceConvention: + "References must match exact tool names from toolNames. Compound forms like _* are not supported.", azureMcpVersion: version, toolNames, };