Skip to main content
POST
Create an eval run (async)

Authorizations

Authorization
string
header
required

MCPJam API key (sk_…). Create one at Settings → API keys. Guest sessions cannot use the API, and API keys cannot manage other API keys.

Path Parameters

projectId
string
required

ID of the hosted project that contains the server.

Body

application/json

Three valid shapes: suiteId (rerun an existing suite, optionally upserting inline tests into it), suiteName + tests + serverIds (create a new suite and run it), or suiteName + tests + environmentId (create a new suite and run it against a project environment, which supplies the servers). Inline tests alone — without a suiteId or a suiteName — are rejected with VALIDATION_ERROR.

suiteId
string
required

Existing suite to rerun. A bare suiteId with no tests reruns the suite exactly as configured.

suiteName
string

Name for a new suite. Required (non-empty) when no suiteId is given.

suiteDescription
string
tests
object[]

Inline test cases to upsert into the suite before running.

Maximum array length: 100
serverIds
string[]

Servers (by ID) the run connects to. Required when creating a new suite unless environmentId is given (the environment supplies the closed server set, and any serverIds sent alongside it are ignored); optional on reruns — when omitted, the run connects the suite's saved server selection (the set its snapshot references). A rerun of a suite with no saved selection is rejected with VALIDATION_ERROR (details.reason: "NO_SAVED_SERVER_SELECTION").

Minimum array length: 1
modelApiKeys
object

Optional per-provider model API keys (e.g. { "anthropic": "sk-ant-…" }). Falls back to your organization's configured providers when omitted.

notes
string
passCriteria
object
iterationOverride
integer

Override the per-case runs count for this run only.

Required range: 1 <= x <= 10
environmentId
string

Run against a project environment. The environment supplies the closed server set (so serverIds is not required and is ignored if sent), and the run is pinned to the revision resolved at launch — if the environment changes in between, the run is rejected with 409 rather than executing against a different configuration.

Response

Run created; execution continues in the background.

runId
string
required
suiteId
string
required
status
string
required
Allowed value: "running"
caseUpsert
object
required

Per-case upsert outcomes for inline tests. Partial failures don't abort the run.

servers
object[]

The servers the run connects to — explicit or derived from the suite's saved selection. name is present when known (always, on the derived path).