Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ sf provar auth login
claude mcp add provar -s user -- sf provar mcp start --allowed-paths /path/to/your/provar/project
```

📖 **[docs/mcp.md](https://github.com/ProvarTesting/provardx-cli/blob/main/docs/mcp.md) — full setup, all 35+ tools, 7 MCP prompts, troubleshooting.**
📖 **[docs/mcp.md](https://github.com/ProvarTesting/provardx-cli/blob/main/docs/mcp.md) — full setup, all 35+ tools, 11 MCP prompts, troubleshooting.**

---

Expand Down
4 changes: 2 additions & 2 deletions docs/NITROX_CATALOG_SOURCE.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"repo": "https://github.com/ProvarTesting/factPackages",
"branch": "main",
"commitSha": null,
"fetchedAt": null
"fetchedAt": null,
"schemasUpdated": null
}
2 changes: 1 addition & 1 deletion docs/mcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -1816,7 +1816,7 @@ The SF Hosted MCP uses per-user OAuth 2.0, respects field-level security and sha

## MCP Prompts

The Provar MCP server registers **7 MCP prompts** that pre-wire the tool chain into guided workflows. AI clients that support MCP prompts can invoke them directly by name instead of manually orchestrating the underlying tool sequence. **Important:** prompts that need to list, read, or write local project files (for example, `.testcase` files used by `provar.loop.fix` and `provar.loop.coverage`) also require a client with its own workspace/file tools, such as Claude Code or another MCP-compatible client with local file access configured; MCP prompt support alone is not sufficient for those workflows.
The Provar MCP server registers **11 MCP prompts** that pre-wire the tool chain into guided workflows. AI clients that support MCP prompts can invoke them directly by name instead of manually orchestrating the underlying tool sequence. **Important:** prompts that need to list, read, or write local project files (for example, `.testcase` files used by `provar.loop.fix` and `provar.loop.coverage`) also require a client with its own workspace/file tools, such as Claude Code or another MCP-compatible client with local file access configured; MCP prompt support alone is not sufficient for those workflows.

---

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
"node": ">=18.0.0 <25.0.0"
},
"bin": {
"provardx": "./bin/mcp-start.js"
"provardx": "./bin/mcp-start.js",
"provardx-cli": "./bin/mcp-start.js"
},
"files": [
"/bin/mcp-start.js",
Expand Down
13 changes: 11 additions & 2 deletions src/mcp/tools/nitroXTools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,16 @@ function getFactComponentValidator(): ValidateFunction | null {
function ajvErrorToIssue(err: ErrorObject): NitroXIssue {
const keyword = err.keyword.replace(/([a-z])([A-Z])/g, '$1_$2').toUpperCase();
const instancePath = err.instancePath;
const appliesTo = instancePath ? instancePath.replace(/^\//, '').replace(/\//g, '.') : 'root';
// For additionalProperties/required, instancePath points to the parent object;
// the actual property name is in err.params.
const params = err.params as Record<string, unknown>;
const extraProp =
err.keyword === 'additionalProperties' ? (params['additionalProperty'] as string | undefined) : undefined;
const missingProp = err.keyword === 'required' ? (params['missingProperty'] as string | undefined) : undefined;
const leafProp = extraProp ?? missingProp;

const basePath = instancePath ? instancePath.replace(/^\//, '').replace(/\//g, '.') : 'root';
const appliesTo = leafProp ? (basePath === 'root' ? leafProp : `${basePath}.${leafProp}`) : basePath;
const pathParts = instancePath.split('/').filter(Boolean);
const severity: 'ERROR' | 'WARNING' = ['REQUIRED', 'TYPE'].includes(keyword) ? 'ERROR' : 'WARNING';
const issue: NitroXIssue = {
Expand All @@ -75,7 +84,7 @@ function ajvErrorToIssue(err: ErrorObject): NitroXIssue {
message: `Schema: ${instancePath || 'root'} — ${err.message ?? 'validation failed'}`,
applies_to: appliesTo,
};
if (pathParts.length > 0) issue.field = pathParts[pathParts.length - 1];
issue.field = leafProp ?? (pathParts.length > 0 ? pathParts[pathParts.length - 1] : undefined);
return issue;
Comment on lines 69 to 88
}

Expand Down
Loading