explore-to-sdk-evals

Convert MCPJam Explore test cases into runnable @mcpjam/sdk eval tests.

2.2k|272|Updated May 23, 2025
One-click install
npx skills add https://github.com/MCPJam/inspector --skill explore-to-sdk-evals
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: explore-to-sdk-evals
Source: https://github.com/MCPJam/inspector/tree/main/sdk/skills/explore-to-sdk-evals
Command: npx skills add https://github.com/MCPJam/inspector --skill explore-to-sdk-evals

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @mcpjam/sdk.

What problem does it solve?

Manually rewriting MCPJam Explore-generated test cases into executable eval suites is error-prone and slow, and small mistakes like reworded prompts or placeholder argument values cause false failures. This Skill translates each Explore case into a matching @mcpjam/sdk eval test with the exact user prompt and expected tool-call assertions preserved.

Core Features & Use Cases

  • One-to-one case translation: Generates exactly one test per Explore case, using verbatim prompt text, negative-test detection, and expected tool-call assertions without inventing or skipping cases.
  • Framework detection: Inspects package.json and config files to emit Jest or Vitest imports, defaulting to Vitest when neither is present.
  • Environment contract enforcement: Prompts for the LLM provider, model, API key env var, and MCP connection details before generating code, avoiding silent OpenAI-only assumptions.
  • Optional MCPJam reporting: Wires createEvalRunReporter with the shared MCPClientManager so uploaded runs include server replay configs and widget snapshots.
  • Use Case: After running an Explore session against your MCP server, ask the agent to convert the generated test cases into a Vitest eval file that runs in CI against your staging server.

Quick Start

Convert the Explore-generated test cases in this conversation into @mcpjam/sdk eval tests for my MCP server.

Frequently Asked Questions about explore-to-sdk-evals

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert MCPJam Explore test cases into eval tests?

Provide the Explore-generated test cases and let the Skill emit one @mcpjam/sdk eval test per case using the exact prompt text. It detects Jest or Vitest from your repo and generates matching imports, assertions, and lifecycle hooks.

How do I test an MCP server with the @mcpjam/sdk?

Connect with MCPClientManager over HTTP or stdio, fetch tools via getToolsForAiSdk, and run prompts through HostRunner. Assert results with hasToolCall, matchNoToolCalls, or argument matchers like matchToolCallWithPartialArgs.

Does the generated eval code work with Vitest and Jest?

Yes, the Skill inspects package.json and config files for Jest or Vitest and emits the correct imports. If neither framework is present, it defaults to Vitest and notes the dependency to add.

Why do my generated eval tests fail on tool argument assertions?

Explore cases often show illustrative placeholder arguments like empty strings, which fail when passed to matchToolCallWithPartialArgs. Prefer hasToolCall unless the case documents real literal values, or use matchToolArgumentWith predicates.

Why are my LLM eval tests always skipped in Vitest?

Module-level env checks run before dotenv loads if dotenv is only configured in vitest.config.ts, since config and test workers run in different contexts. Add import "dotenv/config" as the first import or use a setupFiles entry that loads .env.

Can I upload eval results to MCPJam for replay?

Yes, createEvalRunReporter uploads results when given an MCPJAM_API_KEY, and passing the connected MCPClientManager attaches serverReplayConfigs for HTTP servers. Call finalize before disconnecting, and wrap it in try/catch if upload failures should not fail the run.