Skip to main content
The EvalSuite class groups multiple EvalTest instances and provides aggregate metrics across all tests.

Import

Constructor

Parameters

EvalSuiteConfig
Configuration for the evaluation suite.

EvalSuiteConfig

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

With results saved to MCPJam:

Methods

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()

Returns aggregate recall (same as accuracy in basic context).

precision()

Returns aggregate precision (same as accuracy in basic context).

truePositiveRate()

Returns aggregate true positive rate (same as recall).

falsePositiveRate()

Returns aggregate false positive rate.

averageTokenUse()

Returns average tokens per iteration across all tests.

Properties

name

The suite’s name (via getName()).

Complete Example


Patterns

CI Quality Gate

Per-Test Thresholds

Comparing Across Providers