run_eval
Evaluate variable or multi-input API endpoints in one call: repeat each case, check expected conditions, and return pass rates, failures, latency percentiles, answer variation, optional judge grading.
Instructions
Evaluate an endpoint whose answer varies (LLM / RAG / search) — or any endpoint over many inputs — in one call. Runs each case repeat times and passes it when passRate of the runs satisfy expect; returns one row per case, the distinct failures, latency p50/p95 and how many different answers came back. With judge it also returns question / answer / retrieved passages for you to grade what code cannot (faithfulness, relevance). Runs do not capture variables or replace the session's last response. Every run is a real, possibly paid, request.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cases | No | Inline cases: {name, variables: {question: "…"}, expect, reference}. expect = {status, jsonPathExists, maxDurationMs, checks: [{path (JSONPath; omit = whole body), contains | containsAny | notContains | matches | equals | min | max | minLength | maxLength | includesAll | includesAny | subsetOf (another JSONPath), ignoreCase, minRatio}]} | |
| judge | No | Return samples for you to grade: {answerPath, contextPath, questionVariable, criteria: [faithfulness | relevance | context_relevance | correctness | your own rubric]}. | |
| expect | No | Applied to every case. | |
| repeat | No | Times each case is sent (default 1, or the eval's). | |
| evalName | No | Eval declared under `evals:` in the definition. Otherwise pass `requestId` + `cases`. | |
| passRate | No | Share of a case's runs that must pass (default 1). | |
| caseNames | No | Run only these cases. | |
| requestId | No | ||
| timeoutMs | No | ||
| concurrency | No | ||
| maxRequests | No | Refuse to start when cases × repeat exceeds this. | |
| workspaceRoot | No | Optional when MCP_WORKSPACE_ROOT is set. | |
| definitionRelativePath | Yes |