mcpjam/inspector/explore-to-sdk-evals

Claude Code and agent skill by mcpjam/inspector

Trust tier 2
  • community
  • ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Convert MCPJam Explore-generated test cases into @mcpjam/sdk eval tests. Produces one test per case, exactly matching the user's prompts and expectations.

Install

npx vskill@latest install mcpjam/inspector/explore-to-sdk-evals

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as mcpjam/inspector/explore-to-sdk-evals.

explore-to-sdk-evals

1. Purpose

This skill converts pre-existing MCPJam Explore test cases (in the same document above, under ## Explore-generated test cases) into runnable @mcpjam/sdk eval tests.

Rules:

  • Generate exactly the cases provided — do not invent new cases, do not skip any, do not reword user prompts (use the exact query text from each case’s fenced block).
  • The brief above already includes ## Tools, resources/prompts if any, suggested scenarios, and ## Explore-generated test cases — parse titles, prompts, negative flags, expected tool-call shapes, and expected output from there.
  • For full SDK API (advanced validators, suite patterns, error handling), see the create-mcp-eval skill in the MCPJam SDK or package documentation — this file stays minimal.

2. Framework detection

Before emitting imports, inspect the target repo:

  1. Read `package.json`: scripts and devDependencies for `jest` or `vitest`.
  2. Look for `jest.config.*`, `vitest.config.*`, or `vite.config.*` that references Vitest.

Apply:

ConditionImports / runner
Jest presentdescribe, it, expect, beforeAll, afterAll from @jest/globals (or rely on Jest globals); use ts-jest if TypeScript.
Vitest present (no Jest)import { describe, it, expect, beforeAll, afterAll } from "vitest"
Neither presentDefault to Vitest in generated scaffold (mention adding dep).
User explicitly wants no test frameworkUse EvalTest / EvalSuite .run() in a plain async function main() script with manual assertions — no describe/it.

3. Quick API reference (Explore flows only)

typescript
import { MCPClientManager, HostRunner, createEvalRunReporter } from "@mcpjam/sdk";
import {
matchNoToolCalls,
matchToolCallWithPartialArgs,
matchToolArgument,
matchToolArgumentWith,
} from "@mcpjam/sdk";

Connection

  • const manager = new MCPClientManager();
  • HTTP: await manager.connectToServer(SERVER_ID, { url: MCP_SERVER_URL });
  • Stdio: await manager.connectToServer(SERVER_ID, { command: "node", args: ["./server.js"] });
  • const tools = await manager.getToolsForAiSdk([SERVER_ID]);
  • await manager.disconnectAllServers(); in afterAll

Agent

  • new HostRunner({ tools, model: MODEL, apiKey: LLM_API_KEY, maxSteps: 8, mcpClientManager: manager }) — pass the same MCPClientManager instance you used for connectToServer / getToolsForAiSdk. `mcpClientManager` is required for widgetSnapshots on reported results (MCP App HTML capture via readResource), which powers MCP App replay in MCPJam eval traces. Omitting it still runs tools correctly but traces in the app will have no embedded widget replay.
  • `apiKey` and `model` must match the LLM provider the user chose (see §5); there is no default assumption that the key is an OpenAI key.
  • await runner.run(caseQuery) — use verbatim caseQuery from Explore; for slow MCP + multi-step chains use { timeoutMs } (or timeout) so the prompt does not abort before tools finish (see §6).
  • Multi-turn only if a single Explore case clearly requires follow-up in one narrative; otherwise one prompt per it() (see §4c)

Result inspection

  • result.hasToolCall("tool_name")
  • result.toolsCalled() — string[]
  • result.getToolCalls() — for validators

Validators

  • Negative: matchNoToolCalls(result.toolsCalled())
  • Partial args: matchToolCallWithPartialArgs("tool", { key: value }, result.getToolCalls()) — use only when those values are real literals from Explore, not placeholders (§4).
  • Single-arg exact / predicate: matchToolArgument, matchToolArgumentWith (see create-mcp-eval / SDK validators).

Optional MCPJam upload

  • createEvalRunReporter({ suiteName, apiKey, strict: true, mcpClientManager: manager, serverNames: [SERVER_ID], ... }) — pass the same connected `MCPClientManager` as for HostRunner so uploads include `serverReplayConfigs` (HTTP MCP only; stdio connections do not produce replayable server config in the SDK). That is what sets hasServerReplayConfig in MCPJam and enables Replay this run / server-side MCP replay in the UI.
  • await reporter.recordFromPrompt(result, { caseTitle, passed, expectedToolCalls?, isNegativeTest? })
  • await reporter.finalize() in afterAll before disconnectAllServers() (with timeout). finalize calls getServerReplayConfigs() on the manager; disconnecting first clears client state and uploads without replay metadata. `finalize()` can throw (network, DNS, 401) even when all eval assertions passed. For best-effort upload: wrap in try/catch, log a warning, and continue; or gate uploads on something like MCPJAM_REPORTING=1 so local/CI runs do not go red purely on reporting.
  • UI replay still needs LLM keys in MCPJam Settings for whatever provider the suite uses (e.g. OpenRouter); the app does not store provider API keys on the run.

4. Per-case translation

Use the Explore case title as the human-readable basis for it("...") description (sanitize quotes if needed). Use the exact user prompt from the `` fenced block as runner.run(\...) argument.

Placeholder values in `tool_name({ ... })` lines: Explore often shows illustrative arguments — e.g. create_view({ elements: "" }) usually means “this argument key exists / this shape,” not “the value must be the empty string.” Blindly passing { elements: "" } into matchToolCallWithPartialArgs will fail on real calls. Prefer `hasToolCall("tool_name")` when the brief does not state a concrete literal. When you need stricter checks: use `matchToolArgumentWith("tool", "key", predicate, calls)` (e.g. “present and non-empty”), or `matchToolArgument` only when Explore documents an actual expected value. Reserve matchToolCallWithPartialArgs for real literals listed in the case, not for "", "...", or other stand-ins.

4a. Positive (expected tool calls, not negative)

For each expected tool line like `tool_name({arg: val})`:

typescript
it("Explore case title here", async () => {
const result = await runner.run(`paste exact query from Explore`);
expect(result.hasToolCall("tool_name")).toBe(true);
// Only when Explore lists real literals — not placeholders (see §4 intro).
// expect(
// matchToolCallWithPartialArgs("tool_name", { arg: literalVal }, result.getToolCalls()),
// ).toBe(true);
if (reporter) {
await reporter.recordFromPrompt(result, {
caseTitle: "Explore case title here",
passed: result.hasToolCall("tool_name"),
expectedToolCalls: [{ toolName: "tool_name" }],
});
}
}, 90_000);
4b. Negative test (`Negative test:` / NEG-style case)
typescript
it("Explore case title here", async () => {
const result = await runner.run(`paste exact query from Explore`);
expect(matchNoToolCalls(result.toolsCalled())).toBe(true);
if (reporter) {
await reporter.recordFromPrompt(result, {
caseTitle: "Explore case title here",
passed: matchNoToolCalls(result.toolsCalled()),
isNegativeTest: true,
});
}
}, 90_000);
4c. Multiple expected tools in one Explore case

Prefer one it() that asserts all listed tools (unless the case text explicitly describes a conversation turn — then use context: r1 for the second prompt).

typescript
it("Explore case title", async () => {
const result = await runner.run(`exact query`);
expect(result.hasToolCall("first_tool")).toBe(true);
expect(result.hasToolCall("second_tool")).toBe(true);
// Optional: arg checks only for real literals (§4) — else hasToolCall is enough
}, 90_000);

Do not merge two separate Explore cases into one it() — one Explore case → one `it()` unless the plan above explicitly allows multi-tool-in-one-case as above.


5. Scaffold template

5a. Required environment variables — ask the user before generating code

Do not emit the full scaffold until the user has supplied values (or explicit env var names) for everything needed to run the evals locally and in CI.

  1. Prompt the user for each required variable below. If they prefer names only, use placeholders like process.env.ANTHROPIC_API_KEY and document those names in a short comment or README snippet in the same response — but the skill’s default is to confirm what must be set, not to guess secrets.
ConcernTypical env vars (examples only — not exhaustive)Notes
MCP reachabilityMCP_SERVER_URL, or stdio command / args from the briefAlways align with the brief’s Connection: / Connection (stdio):.
LLM credentialProvider-specific — e.g. OPENAI_API_KEY, ANTHROPIC_API_KEY, GOOGLE_GENERATIVE_AI_API_KEY, AZURE_OPENAI_API_KEY, or a key your codebase already uses`OPENAI_API_KEY` is one option, not the assumed default. Ask which provider and model they use, then wire apiKey and EVAL_MODEL (or equivalent) to that provider’s SDK expectations.
Model stringEVAL_MODEL or provider’s conventionMust match the chosen provider’s model id format.
Optional MCPJam uploadMCPJAM_API_KEY (an sk_… key from Settings → API keys; optional MCPJAM_PROJECT_ID)Omit reporter wiring if not provided.
  1. Never imply OpenAI-only copy: avoid phrasing like “paste your OpenAI key” unless the user already said OpenAI. Default language: “which LLM provider and API key env var are you using?”
  2. Same rule as create-mcp-eval: ask which LLM provider, model, and env var name before generating code; never silently default to a single vendor.
  3. Required assistant output (before codegen): After the user answers, echo an explicit env contract so the model cannot “skip” to OpenAI-flavored code without mirroring what was agreed:

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 93 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
2,062
Repository forks
245
7-day trend score
38

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Extension points

  • hookPre/post lifecycle hooks

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/mcpjam/inspector/explore-to-sdk-evals/badge)](https://verified-skill.com/skills/mcpjam/inspector/explore-to-sdk-evals)

Something wrong with this skill or its page? Tell us.