> ## Documentation Index
> Fetch the complete documentation index at: https://mcpjam-mintlify-docs-update-pr-4053-1786992934526.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# List run iterations

> Per-iteration results: actual tool calls, structured token usage, and latency. Cursor-paginated.



## OpenAPI

````yaml /reference/openapi.json get /projects/{projectId}/eval-runs/{runId}/iterations
openapi: 3.1.0
info:
  title: MCPJam API
  version: 1.0.0-preview
  description: >-
    Programmatic access to MCP servers saved in your MCPJam projects — live
    diagnostics (validate, inspect, export) and operations: call tools, render
    prompts, run eval suites asynchronously and poll their results, and import
    OAuth tokens.


    **The API is in preview**: the surface may change while we finish the
    design. Error `code` values are stable; error `message` strings are not.
    Write clients that ignore unknown response fields.
  contact:
    name: MCPJam
    url: https://github.com/MCPJam/inspector/issues
servers:
  - url: https://app.mcpjam.com/api/v1
    description: Hosted MCPJam
security:
  - bearerAuth: []
tags:
  - name: Hosts
    description: >-
      Project hosts: named model + capability profiles you run chats and eval
      suites against.
  - name: Environments
    description: >-
      Project environments: named, live-editable execution bundles (one host, an
      optional standalone server group, optionally pinned skills and plugin
      versions) that eval suites and journeys run against. Distinct from Sandbox
      images, which are Computer base images. Reads require project membership;
      every write requires project admin.
  - name: Plugins
    description: >-
      Agent Plugins imported into a project — read-only inventory and version
      detail.
  - name: Sandbox images
    description: >-
      Custom Computer images: a digest-pinned Dockerfile built into an immutable
      image your project's computers boot from.
  - name: Server diagnostics
    description: Connect-level health checks against a saved MCP server.
  - name: Primitives
    description: 'The server''s MCP primitives: tools, prompts, and resources.'
  - name: Export
    description: Full-server snapshots for diffing and CI.
  - name: Execution
    description: 'Run the server''s primitives: call tools, render prompts.'
  - name: Eval runs
    description: >-
      Asynchronous eval suite runs: create with 202, poll status, iterations,
      and traces.
  - name: Conformance runs
    description: >-
      Ingest MCP spec-conformance results from the SDK/CLI into project-owned
      history. Distinct from Eval runs (authored LLM cases) and from directory
      readiness.
  - name: Server connections
    description: >-
      Connect an MCP server URL to a project, authorizing in a browser when the
      server requires it.
  - name: OAuth
    description: 'Bring-your-own OAuth: import externally obtained tokens for a server.'
  - name: Scenarios
    description: >-
      Read-only access to the scenarios published from a project: listing,
      settings, attached servers, and share links.
  - name: Catalog
    description: >-
      Discover the resources the other routes operate on: your account,
      projects, servers, eval suites, and chat sessions.
  - name: Tunnels
    description: >-
      Relay tunnels that expose local MCP servers through a public URL,
      registered as first-class project servers (the `mcpjam cloud tunnel` CLI
      flow).
  - name: Agent
    description: >-
      Headless agent turns over the public API: send a message history, the
      server runs one assistant turn with project-scoped workspace tools (eval
      reads + suite creation) on a pinned hosted model, and returns the reply
      plus created-resource references.
  - name: Swarms
    description: >-
      Personas, journeys and swarm containers — the authoring half of Swarms —
      plus the model-backed generation that drafts them.
  - name: Swarm runs
    description: >-
      Launching journeys and reading what they produced. Launching SPENDS — see
      the per-operation notes.
  - name: Swarm insights
    description: >-
      What a swarm run revealed. The scorecard and findings are deterministic
      and free; requesting wave insights runs models and draws on your shared
      daily ledger.
  - name: User testing
    description: >-
      Publishing an environment for real visitors, and controlling who can reach
      it. Several of these NARROW access and take effect immediately.
  - name: Directory readiness
    description: >-
      Grade a saved server against a publisher's listing requirements:
      Anthropic's connector directory or OpenAI's plugin directory. Reported as
      lane status and coverage, never as a numeric score, and excluded from
      `pooledConformanceScore`. Deterministic grading is free; model-backed
      experience observations are an explicit opt-in that consumes MCPJam
      credits and can never decide a verdict.
  - name: Registry
    description: >-
      Search the scraped MCP directories (Claude, ChatGPT, and any future
      source), list curated/org registry cards, and install them into a project.
      Install writes a `servers` row and provenance — it does not open a live
      session. There is no catalog-uninstall route: delete the project server
      instead. Directory reads require a bearer (including minted guest tokens)
      but do not materialize a user. Card/connection reads and all writes are
      authed-non-guest.
paths:
  /projects/{projectId}/eval-runs/{runId}/iterations:
    get:
      tags:
        - Eval runs
      summary: List run iterations
      description: >-
        Per-iteration results: actual tool calls, structured token usage, and
        latency. Cursor-paginated.
      operationId: listEvalRunIterations
      parameters:
        - $ref: '#/components/parameters/projectId'
        - $ref: '#/components/parameters/runId'
        - name: limit
          in: query
          required: false
          description: Page size, 1–200. Defaults to 50.
          schema:
            type: integer
            minimum: 1
            maximum: 200
            default: 50
        - name: cursor
          in: query
          required: false
          description: Opaque cursor from a previous response's `nextCursor`.
          schema:
            type: string
      responses:
        '200':
          description: One page of iterations.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EvalIterationPage'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  parameters:
    projectId:
      name: projectId
      in: path
      required: true
      description: ID of the hosted project that contains the server.
      schema:
        type: string
    runId:
      name: runId
      in: path
      required: true
      description: Eval run ID, as returned by `POST /eval-runs`.
      schema:
        type: string
  schemas:
    EvalIterationPage:
      type: object
      required:
        - items
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/EvalIteration'
        nextCursor:
          type: string
          description: Opaque cursor for the next page. Omitted on the last page.
    EvalIteration:
      type: object
      required:
        - id
        - iterationNumber
        - status
        - expectedToolCalls
        - actualToolCalls
      properties:
        id:
          type: string
        testCaseId:
          type:
            - string
            - 'null'
        title:
          type:
            - string
            - 'null'
        iterationNumber:
          type: integer
        status:
          type: string
          enum:
            - pending
            - running
            - completed
            - failed
            - cancelled
        result:
          type:
            - string
            - 'null'
          enum:
            - passed
            - failed
            - null
        model:
          type:
            - string
            - 'null'
        provider:
          type:
            - string
            - 'null'
        startedAt:
          type:
            - number
            - 'null'
          description: Epoch milliseconds.
        durationMs:
          type:
            - number
            - 'null'
          description: Wall-clock duration; `null` until terminal.
        tokensUsed:
          type:
            - number
            - 'null'
        usage:
          type:
            - object
            - 'null'
          description: >-
            Structured token usage (input/output/cached/reasoning) when
            available.
          additionalProperties: true
        actualToolCalls:
          type: array
          items:
            type: object
            additionalProperties: true
        expectedToolCalls:
          type: array
          items:
            type: object
            additionalProperties: true
        error:
          type:
            - string
            - 'null'
        scores:
          type:
            - array
            - 'null'
          description: >-
            Per-scorer verdicts for this iteration. `null` when the run predates
            scoring, or when the stored payload failed validation at the
            boundary — partially-trusted score data is never projected.
          items:
            $ref: '#/components/schemas/ScoreResult'
        evaluationConfig:
          description: >-
            The scorer definitions `scores` were produced under. Present exactly
            when `scores` is: results carry only a `definitionHash`, so without
            this a caller cannot tell a gating failure from an advisory one.
          oneOf:
            - $ref: '#/components/schemas/EvaluationConfigSnapshot'
            - type: 'null'
        scoreIntegrity:
          type:
            - string
            - 'null'
          description: >-
            Set when the backend downgraded this iteration's verdict because its
            gating score evidence was malformed.
          enum:
            - score_integrity_invalid
            - null
        stageResults:
          type: array
          description: Verified D1 user-value chain rows, in chain order.
          items:
            $ref: '#/components/schemas/StageResultRow'
        firstFailedStage:
          type: string
          enum:
            - connection
            - discovery
            - selection
            - call
            - response
            - userValue
        failureCategory:
          type: string
          enum:
            - setup
            - metadata
            - selection
            - arguments
            - serverData
            - userValue
            - evaluator
        stageAnalyzerVersion:
          type: integer
          minimum: 0
        stageResultsUnverified:
          type: boolean
          enum:
            - true
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: >-
            Stable, machine-readable error code. New codes may be added over
            time; treat unknown codes as non-retryable failures unless the HTTP
            status says otherwise.
          enum:
            - UNAUTHORIZED
            - FORBIDDEN
            - NOT_FOUND
            - CONFLICT
            - VALIDATION_ERROR
            - RATE_LIMITED
            - FEATURE_NOT_SUPPORTED
            - SERVER_UNREACHABLE
            - TIMEOUT
            - OAUTH_REQUIRED
            - INTERNAL_ERROR
        message:
          type: string
          description: >-
            Human-readable description. May change between releases — don't
            match on it.
        details:
          type: object
          description: Optional, unstructured context bag.
          additionalProperties: true
    ScoreResult:
      type: object
      description: >-
        One scorer's verdict for one iteration. `passed` is DERIVED as `value >=
        passThreshold` — never asserted by the scorer or the model.
      required:
        - scorerId
        - scorerVersion
        - definitionHash
        - status
        - passThreshold
        - deterministic
      properties:
        scorerId:
          type: string
          maxLength: 128
        scorerVersion:
          type: string
        definitionHash:
          type: string
          description: >-
            Joins this result to its definition in
            `evaluationConfig.definitions`.
        status:
          type: string
          description: >-
            `error` is never a low score — a crashed judge is not a disagreeing
            judge. `not_applicable` never gates and is excluded from aggregation
            denominators, which is what distinguishes it from `skipped`.
          enum:
            - scored
            - error
            - skipped
            - not_applicable
        value:
          type: number
          minimum: 0
          maximum: 1
          description: Present only when `status` is `scored`.
        passThreshold:
          type: number
          minimum: 0
          maximum: 1
        passed:
          type: boolean
          description: >-
            Derived as `value >= passThreshold`; present only when `status` is
            `scored`.
        rationale:
          type: string
          maxLength: 2000
        evidence:
          type: array
          maxItems: 20
          items:
            type: string
            maxLength: 300
        deterministic:
          type: boolean
        model:
          type: string
        promptHash:
          type: string
        error:
          type: string
          maxLength: 500
          description: Present only when `status` is `error`.
        scope:
          type: object
          description: >-
            Absent means case-level; `{kind:"turn",promptIndex}` means the check
            was authored on a single turn.
          additionalProperties: true
    EvaluationConfigSnapshot:
      type: object
      description: >-
        The scorer definitions a run graded with, plus their hash. Changing
        scorer configuration changes this hash but NOT the case identity — a
        threshold edit must not fork a scenario's history.
      required:
        - hash
        - definitions
      properties:
        hash:
          type: string
          description: >-
            `evaluationConfigHash` over the resolved definitions.
            Order-independent — the hash sorts internally.
        definitions:
          type: array
          items:
            $ref: '#/components/schemas/ResolvedScoreDefinition'
    StageResultRow:
      type: object
      description: One verified D1 user-value stage verdict, in chain order.
      required:
        - stage
        - state
      properties:
        stage:
          type: string
          enum:
            - connection
            - discovery
            - selection
            - call
            - response
            - userValue
        state:
          type: string
          enum:
            - passed
            - failed
            - notReached
            - notMeasured
            - notApplicable
        reason:
          type: string
          enum:
            - noSpanChannel
            - noEvidenceCaptured
            - matchVerdictUnavailable
            - traceAbsent
            - executorEmitsNoSpans
            - blockedByPolicy
            - evaluatorError
            - setupAborted
            - connectFailed
            - toolsListFailed
            - egressUnverified
            - lifecycleStopped
            - notAuthored
            - earlierStageFailed
            - missingToolCall
            - unexpectedToolCall
            - argumentMismatch
            - toolError
            - protocolError
            - renderFailed
            - predicateFailed
            - observed
            - impliedByLaterEvidence
        evidence:
          type: object
          properties:
            spanIds:
              type: array
              items:
                type: string
              maxItems: 5
            promptIndexes:
              type: array
              items:
                type: integer
              maxItems: 5
            predicateReasons:
              type: array
              items:
                type: string
                maxLength: 500
              maxItems: 5
          additionalProperties: false
    ResolvedScoreDefinition:
      type: object
      description: >-
        A scorer definition with every semantic default resolved. This is the
        form that is hashed, so an omitted `onError` and an
        explicitly-configured default digest identically.
      required:
        - scorerId
        - idSource
        - scorerVersion
        - implementationHash
        - deterministic
        - passThreshold
        - role
        - onError
        - onSkipped
      properties:
        scorerId:
          type: string
          maxLength: 128
        idSource:
          type: string
          description: >-
            `generated` ids are positional and UNSTABLE across config edits;
            only `explicit` ids may be referenced by a gate policy or tracked
            across runs.
          enum:
            - explicit
            - generated
        scorerVersion:
          type: string
        implementationHash:
          type: string
          description: >-
            Digest of what the scorer actually does — the canonicalized
            predicate, or the judge prompt plus template version. Required so
            two judges with different prompts cannot hash identically.
        label:
          type: string
          description: Presentation only; deliberately excluded from the hash.
        deterministic:
          type: boolean
        passThreshold:
          type: number
          minimum: 0
          maximum: 1
        role:
          type: string
          description: Only `gating` scorers decide the iteration's verdict.
          enum:
            - gating
            - advisory
        onError:
          type: string
          description: >-
            What an `error` status does to a gating iteration. Defaults to
            `fail`.
          enum:
            - fail
            - ignore
        onSkipped:
          type: string
          description: >-
            What a `skipped` status does to a gating iteration. Separate from
            `onError`: a crashed judge and a judge that never ran are different
            failures.
          enum:
            - fail
            - ignore
        model:
          type: string
        scope:
          type: object
          additionalProperties: true
  responses:
    Unauthorized:
      description: >-
        Missing, invalid, revoked, or orphaned key (`UNAUTHORIZED`) — or the
        **target MCP server** needs an OAuth grant (`OAUTH_REQUIRED`), which is
        a property of the server, not your key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            badKey:
              summary: Invalid or revoked key
              value:
                code: UNAUTHORIZED
                message: Invalid API key
            oauthRequired:
              summary: Target server needs an OAuth grant
              value:
                code: OAUTH_REQUIRED
                message: Server requires OAuth authorization
    Forbidden:
      description: Key is valid but not allowed to do this.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: FORBIDDEN
            message: You do not have access to this project
    NotFound:
      description: Unknown project, server, or resource.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: NOT_FOUND
            message: Server not found
    RateLimited:
      description: >-
        Per-key rate limit exceeded (60 requests/minute sustained, bursts up to
        10). Honor `Retry-After` and back off with jitter.
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: RATE_LIMITED
            message: API key rate limit exceeded. Slow down and retry.
    InternalError:
      description: Something failed on MCPJam's side.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: INTERNAL_ERROR
            message: Unexpected internal error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        MCPJam API key (`sk_…`). Create one at [Settings → API
        keys](https://app.mcpjam.com/settings/api-keys). Guest sessions cannot
        use the API, and API keys cannot manage other API keys.

````