Read a chat session's execution trace
Per-turn execution spans: per-tool-call latency, token usage, and indices into the transcript. Same span shape as the eval iteration trace.
Incremental by default — returns the LATEST turn, not the whole session, because a session’s spans are the largest thing this API emits and the turn you just took is the one you are debugging. Reach older turns with turnId or afterPromptIndex; use includeSpans=false for cheap per-turn summaries.
A turn whose spans could not be read reports spansUnavailable: true rather than an empty spans array: “made no calls” and “could not fetch” are opposite conclusions.
Authorizations
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
The chat session's id — the same id POST /chat-sessions/messages returns and GET /chat-sessions lists.
Query Parameters
Optional project scope. When set, a session in another project answers 404 — the same answer as absence, so this is never an existence oracle.
Return exactly this turn. Mutually exclusive with afterPromptIndex.
Page forward from this turn index. Mutually exclusive with turnId.
x >= 0Turns to return, 1–20. Defaults to 1 (the latest).
1 <= x <= 20Set false for per-turn summaries without span payloads.
Response
The selected turns, ascending by promptIndex.

