EvalSuite class groups multiple EvalTest instances and provides aggregate metrics across all tests.
Import
Constructor
Parameters
EvalSuiteConfig
Configuration for the evaluation suite.
EvalSuiteConfig
matchOptions is a default, not an override: a test that sets its own keeps it. This mirrors how the hosted product layers suite → case, so a suite behaves the same whether it runs from your test file or from the platform.When an API key is available — via
mcpjam.apiKey or the MCPJAM_API_KEY environment variable — all test results are consolidated into a single run and saved to MCPJam after the suite completes. Individual EvalTest auto-saves are suppressed to avoid duplicate uploads. Set mcpjam.enabled: false to disable.Example
Methods
runWithClient()
Run code-authored tests with the latest saved client in your project:mcpjam.enabled: false to run without uploading results.
runWithClient uses MCPJam inference for Anthropic Claude and OpenAI GPT-5 models, billed to
that project. It requires a backend that returns saved client versions. The
optional baseUrl is the MCPJam app origin for a custom deployment.
Your code owns server connections, credentials, and MCP connection settings;
the client’s saved server IDs and connection overrides are not applied to those
connections. The first release does not launch cloud computers, browsers, saved
skills, built-in tools, progressive tool discovery, or interactive approvals.
Clients requiring these features fail before tests execute. Existing
run(executor) calls keep their current behavior.
add()
Adds a test to the suite.Parameters
Example
run()
Runs all tests in the suite and returns aggregate results.Parameters
EvalTestRunOptions
EvalSuiteResult
Example
Tests within the suite run sequentially, but each test’s iterations can run concurrently based on the
concurrency setting.accuracy()
Returns the aggregate accuracy across all tests.Returns
number - Average accuracy of all tests (0.0 - 1.0).
Example
get()
Retrieves a specific test by name.Parameters
Returns
EvalTest | undefined - The test, or undefined if not found.
Example
getAll()
Returns all tests in the suite.Returns
EvalTest[] - Array of all tests.
Example
getName()
Returns the suite’s name.size()
Returns the number of tests in the suite.getResults()
Returns the full suite results from the last run.recall()
Aggregate recall across every test in the suite that declaredexpectedToolCalls.
precision()
Aggregate precision across every test in the suite that declaredexpectedToolCalls.
truePositiveRate()
Aggregate true positive rate (same as recall).unexpectedToolCallRate()
The fraction of expectation-bearing iterations across the suite that made at least one tool call nobody asked for.falsePositiveRate()
averageTokenUse()
Returns average tokens per iteration across all tests.Properties
name
The suite’s name (viagetName()).
Complete Example
Patterns
CI gate on suite accuracy
accuracy() is the suite-wide rate: one number over every iteration the run
executed. Gating on it asks the same question a hosted suite’s suite accuracy
threshold asks.
CI gate on per-case pass rates
A per-test threshold asks the OTHER question — the one a hosted suite’s per-case pass rate asks — and the two do not agree. Nine of ten tests always passing and one always failing gives a suite accuracy of 0.9, which clears the gate above, while the tenth test’s own rate is 0. Gate on whichever question you actually mean; a fraction is not a percentage of the other one.Per-Test Thresholds
Comparing Across Providers
Related
- Running Evals - Conceptual guide
- EvalTest Reference - Individual test API
- Saving Eval Results - Save results to MCPJam
- Testing Across Providers - Compare LLMs

