Skip to content

Develop#142

Merged
mrdailey99 merged 4 commits into
mainfrom
develop
May 6, 2026
Merged

Develop#142
mrdailey99 merged 4 commits into
mainfrom
develop

Conversation

@mrdailey99
Copy link
Copy Markdown
Collaborator

No description provided.

mrdailey99 and others added 4 commits May 5, 2026 11:53
…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…
Copilot AI review requested due to automatic review settings May 5, 2026 21:06
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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(...) to server.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-bounds testCaseId values 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.

@mrdailey99 mrdailey99 merged commit b1bc2de into main May 6, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants