Develop#142
Merged
Merged
Conversation
…r Copilot RCA: All 41 MCP tool names used dot-notation (provar.xxx.yyy) which violates the [a-z0-9_-] constraint enforced by GitHub Copilot and other MCP clients. Fix: Rename to underscore form across source, tests, scripts, and docs; restore 4 correctness fixes from pre-commit review; bump version to 1.5.0-beta.15. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…egisterTool() with human-readable titles
RCA: server.tool() is deprecated in MCP SDK v1.8+; tools lacked human-readable labels in the Claude Code /mcp picker, displaying raw underscore names instead of descriptive titles
Fix: migrated all 41 tool registrations to server.registerTool(name, {title, description, inputSchema}, handler) with approved title strings; added registerTool() method to all 17 MockMcpServer test classes and the CapturingServer in testCaseValidate tests
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…develop merge conflicts RCA: Out-of-bounds .testinstance paths could bypass coverage via idMap; suites without .planitem were still scored; slim response omitted plan_integrity_warnings; test files referenced old dot-notation tool name. Fix: Null testCaseId alongside testCasePath for OOB instances; skip suites and plans missing .planitem from hierarchy; expose plan_integrity_warnings in slim response; update 4 test calls provar.project.validate → provar_project_validate; fix testCaseGenerate to use literal id="1"; add missing tools (provar_connection_list, provar_testcase_step_edit, provar_testplan_create, provar_qualityhub_examples_retrieve, NitroX family) to public docs and course summary; resolve merge conflicts across 11 files. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
PDX-0: fix(mcp): rename tool names from dot-notation to underscore fo…
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the MCP server’s tool registration approach and renames MCP tool IDs from dotted names (e.g. provar.testcase.validate) to underscored names (e.g. provar_testcase_validate) across implementation, tests, smoke script, and documentation. It also tightens project validation/coverage behavior around .planitem presence and out-of-bounds test instance references.
Changes:
- Migrated MCP tool registration calls from
server.tool(...)toserver.registerTool(...)using{ title, description, inputSchema }configs, and renamed tool IDs to underscore-style. - Updated unit tests, smoke script, prompts/docs/messages to reference the new tool IDs.
- Adjusted project plan/suite reading to skip suites missing
.planitem(with warnings) and to avoid counting out-of-boundstestCaseIdvalues toward coverage.
Reviewed changes
Copilot reviewed 53 out of 53 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/unit/mcp/testSuiteValidate.test.ts | Updates mock server + test calls for renamed provar_testsuite_validate. |
| test/unit/mcp/testPlanValidate.test.ts | Updates mock server + test calls for renamed provar_testplan_validate. |
| test/unit/mcp/testCaseValidate.test.ts | Capturing server updated to support registerTool. |
| test/unit/mcp/testCaseStepTools.test.ts | Updates mock server + test calls for renamed provar_testcase_step_edit. |
| test/unit/mcp/rcaTools.test.ts | Updates mock server + test calls for renamed RCA/locate tools. |
| test/unit/mcp/qualityHubTools.test.ts | Updates mock server + test calls for renamed Quality Hub CLI wrapper tools. |
| test/unit/mcp/qualityHubApiTools.test.ts | Updates mock server + test calls for renamed corpus retrieval tool. |
| test/unit/mcp/propertiesTools.test.ts | Updates mock server + test calls for renamed properties tools + next_steps assertions. |
| test/unit/mcp/projectValidateFromPath.test.ts | Updates mock server + test calls for renamed provar_project_validate. |
| test/unit/mcp/pageObjectGenerate.test.ts | Updates mock server + test calls for renamed provar_pageobject_generate. |
| test/unit/mcp/migrationPrompts.test.ts | Updates prompt text assertions to reference renamed tools. |
| test/unit/mcp/loopPrompts.test.ts | Updates prompt text assertions to reference renamed tools. |
| test/unit/mcp/defectTools.test.ts | Updates mock server + test calls for renamed defect-create tool; formatting cleanup. |
| test/unit/mcp/connectionTools.test.ts | Updates mock server + test calls for renamed provar_connection_list. |
| test/unit/mcp/antTools.test.ts | Updates mock server + test calls for renamed ANT tools. |
| src/services/projectValidation.ts | Skips suites missing .planitem (with warnings) and nulls out-of-bounds testCaseId for coverage. |
| src/mcp/tools/testSuiteValidate.ts | Registers tool as provar_testsuite_validate via registerTool config. |
| src/mcp/tools/testPlanValidate.ts | Registers tool as provar_testplan_validate via registerTool config; schema formatting. |
| src/mcp/tools/testCaseValidate.ts | Registers tool as provar_testcase_validate and updates internal references/messages. |
| src/mcp/tools/testCaseStepTools.ts | Registers tool as provar_testcase_step_edit and updates log/error strings. |
| src/mcp/tools/testCaseGenerate.ts | Registers tool as provar_testcase_generate; updates descriptive text references. |
| src/mcp/tools/rcaTools.ts | Registers tools as provar_testrun_report_locate / provar_testrun_rca; updates recommendations. |
| src/mcp/tools/qualityHubTools.ts | Registers Quality Hub wrapper tools with underscored IDs; updates suggestion text. |
| src/mcp/tools/qualityHubApiTools.ts | Registers corpus retrieval tool as provar_qualityhub_examples_retrieve; updates log strings. |
| src/mcp/tools/propertiesTools.ts | Registers properties tools with underscored IDs; updates next-step guidance strings. |
| src/mcp/tools/projectValidateFromPath.ts | Registers tool as provar_project_validate; updates log/error strings. |
| src/mcp/tools/projectInspect.ts | Registers tool as provar_project_inspect; minor formatting/ternary cleanup. |
| src/mcp/tools/pageObjectGenerate.ts | Registers tool as provar_pageobject_generate; updates log strings. |
| src/mcp/tools/defectTools.ts | Registers tool as provar_qualityhub_defect_create; refactors formatting and guidance text. |
| src/mcp/tools/connectionTools.ts | Registers tool as provar_connection_list; updates error messages to new IDs. |
| src/mcp/server.ts | Renames ping tool to provardx_ping and wires all renamed registrations. |
| src/mcp/prompts/migrationPrompts.ts | Updates prompt guidance strings to reference renamed tools. |
| src/mcp/prompts/loopPrompts.ts | Updates prompt guidance strings to reference renamed tools. |
| server.json | Version bump to 1.5.0-beta.15. |
| scripts/mcp-smoke.cjs | Updates smoke test tool calls to renamed tool IDs. |
| package.json | Version bump to 1.5.0-beta.15. |
| messages/sf.provar.mcp.start.md | Updates the “Available tools” list to renamed tool IDs. |
| messages/sf.provar.auth.clear.md | Updates messaging to reference renamed validator tool ID. |
| docs/university-of-provar-mcp-course.md | Updates documentation examples and tool tables to renamed tool IDs. |
| docs/provar-mcp-public-docs.md | Updates documentation examples and tool tables to renamed tool IDs. |
| docs/PROVAR_TEST_STEP_REFERENCE.md | Updates top-level references to renamed corpus/validator tools. |
| docs/mcp-pilot-guide.md | Updates setup/testing instructions and tool references to renamed tool IDs. |
Comments suppressed due to low confidence (1)
src/mcp/server.ts:82
- Tool names were changed from dotted (e.g. "provardx.ping", "provar.testcase.validate") to underscored (e.g. "provardx_ping", "provar_testcase_validate"). This is a breaking API change for existing MCP clients; consider registering the legacy names as aliases (pointing to the same handler) or explicitly surfacing a deprecation/compatibility note in the server/tooling so older clients fail with a clearer message.
// ── Sanity-check tool ────────────────────────────────────────────────────────
server.registerTool(
'provardx_ping',
{
title: 'Ping MCP Server',
description:
'Sanity-check tool. Echoes back a message with a timestamp. Use this to verify the MCP server is reachable before calling other tools.',
inputSchema: {
message: z.string().optional().default('ping').describe('Optional message to echo back'),
},
},
({ message }) => {
const result = {
pong: message,
ts: new Date().toISOString(),
server: `provar-mcp@${SERVER_VERSION}`,
updateAvailable: config.updateResult?.updateAvailable ?? false,
latestVersion: config.updateResult?.latestVersion ?? null,
updateCommand: config.updateResult?.updateCommand ?? null,
};
return {
content: [{ type: 'text' as const, text: JSON.stringify(result) }],
structuredContent: result,
};
}
);
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.