Skip to content

Add MCP server agent evals; require SCAPI/CIP skill reads - #730

Merged
clavery merged 1 commit into
mainfrom
feature/mcp-evals
Oct 1, 2026
Merged

clavery merged 1 commit into
mainfrom
feature/mcp-evals

Conversation

@clavery

@clavery clavery commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds agent-level evals for the MCP server and the tool/guidance fixes they surfaced.

Evals (packages/b2c-dx-mcp/evals) — a claude plugin eval suite that runs the locally built server:

  • Compliance (default, pnpm run mcp:eval): every case, plugin loaded, --ablation none. Checks tool choice, required skill reads, tools that must not be called, and no terminal fallback.
  • Enhancement (pnpm run mcp:eval:ablation): ablation-tagged docs cases run with and without the plugin and report Δ. Path graders are arm: with-only so the no-plugin arm is judged on its answer.
  • Prompts are phrased as a developer new to B2C Commerce would ask, with no tool hints.
  • Offline only today (tier0); fixtures use a fake dw.json. docs_schema_read is flagged (whole-XSD output is too large) and its case is in disabled/.

MCP fixes

  • skillRead is now a required true literal on scapi_search, scapi_execute and cip_query. Before, only Opus 5.5 read the SCAPI skill first; Sonnet 5/5.5 now do too.
  • SCAPI tool descriptions are shorter; code-mode details (spec objects, execute globals, examples) moved into the SCAPI skill. scapi_execute is described as the general path for Admin/Shopper tasks when no dedicated tool fits.
  • Server instructions and cartridge_deploy point first-deploy prerequisite questions to the config skill.

SDK fix

  • SCAPI code mode accepts code ending in a semicolon or a trailing line comment (previously a syntax error).

Latest results (Sonnet 5.5): compliance cases 1.00; enhancement mean Δ +0.61.

Testing

Requires the claude CLI with plugin eval.

  1. pnpm --filter @salesforce/b2c-tooling-sdk run build && pnpm --filter @salesforce/b2c-dx-mcp run build
  2. pnpm run mcp:eval --runs 1 -j 5 — compliance cases should pass.
  3. pnpm run mcp:eval:ablation --runs 1 -j 5 — each case should show a positive Δ.
  4. In an MCP client, ask for a SCAPI task (e.g. take a product offline) and confirm the agent reads skill://mcp/scapi/SKILL.md before scapi_search.

- packages/b2c-dx-mcp/evals: claude plugin eval suite (compliance by default, ablation-tagged enhancement cases with Δ)
- skillRead is a required literal on scapi_search, scapi_execute and cip_query; slimmer SCAPI descriptions with code-mode details moved into the SCAPI skill
- Point first-deploy questions to the config skill
- SCAPI code mode accepts trailing semicolons and line comments
@clavery
clavery merged commit 9cca45e into main Oct 1, 2026
7 checks passed
@clavery
clavery deleted the feature/mcp-evals branch October 1, 2026 22:06
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.

1 participant