Estela
Reference

MCP tools reference

Audience: someone who writes an MCP client against estela mcp, or changes the tools. This page lists each tool's input schema and result fields as the code in packages/server/src/agent-tools/ defines them (inputs.ts, session-list.ts, trace-reads.ts, event-read.ts, bounds.ts, register.ts). How to set the server up is in the MCP guide; what semver covers is in Public interface.

Conventions

  • Every tool is read-only. Each input is a JSON object; an unknown property is an error.
  • Each result is one compact JSON text of at most 40,000 characters.
  • Times are ISO 8601 UTC strings. Paths show ~ for the home directory.
  • A field that is absent was not recorded. In a session item with summary: "pending", an absent count means it is not computed yet. A count is never 0 by default.
  • traceId in a session tool is optional; left out, it names current, the session the server was started with (only estela mcp <session> and a dev server started with a session have one).
  • Event and lane ids are returned as written only when they are 1 to 128 characters of letters, digits, _, ., :, - and redaction leaves them unchanged; any other id is returned as @e<n> (event, by position) or @l<n> (lane, by position), and every tool accepts that form back. A repeated id names the last event with it.
  • truncated lists cut fields as paths (arrays of keys and indexes) from the object that carries it.

Inputs

ToolPropertyType and rangeDefault
estela_list_sessionsagentstring, ≤ 64 characters, an agent idall agents
projectstring, ≤ 500; part of the project name, ignoring case
cwdstring, ≤ 1000; an absolute path or one starting with ~; that directory and those inside it
sincedate YYYY-MM-DD (00:00 UTC) or date-time with Z or an offset; sessions active at or after it
untilsame format; sessions that started at or before it (last activity when no start is recorded)
hasCompaction, hasFailedToolsboolean; true: at least one; false: the count is recorded and is 0
offsetinteger 0–1000000
limitinteger 1–5020
estela_search_sessionsquery (required)string, 1–200; matched in titles and the user's own prompts, ignoring case
every estela_list_sessions property
estela_session_summarytraceIdstring, 1–200current
estela_list_turnstraceId, offset, limitlimit integer 1–100limit 20
estela_list_requeststraceId, lane (string ≤ 200, a lane id), turn (integer 0–100000, a turn index), offset, limitlimit integer 1–200limit 50
estela_get_eventtraceId, eventId (required, string 1–200), maxChars (integer 256–20000), original (boolean)maxChars 2000, original false
estela_reconstructtraceId, eventId (required, string 1–200)

hasCompaction and hasFailedTools never match a session whose agent does not record the count. When matching sessions are not counted yet, the tool asks for their counts first and waits up to 5 seconds; sessions still not counted are left out and counted in unsummarized.

Results

estela_list_sessions, estela_search_sessions

{ sessions, total, offset, nextOffset?, unsummarized?, agents, pricesVersion }

FieldMeaning
sessionsthe session items of this page, newest activity first
totalsessions that match, over every page
nextOffsetpresent when more sessions match; pass it as offset
unsummarizedsessions left out because their counts were still being computed (flag filters only)
agents[{ id, sessions }]: every agent the server reads, with its session count
pricesVersionthe price snapshot every session item's costUsd is priced at

A session item: traceId, agent, title?, project?, cwd?, startedAt?, lastActiveAt, sizeBytes, firstPrompt?, summary, the counts turns?, requests?, inputTokens?, outputTokens?, durationMs?, compactions?, subagents?, failedTools?, costUsd?, unpricedRequests?, error? ({ reason, file?, line? }), and truncated?. summary is ready, pending (counts not computed yet), or failed (the session could not be read; see error). costUsd is the list price of the session's priced requests at pricesVersion, and is absent when none is priced or the summary is not ready (never 0 for unknown); unpricedRequests is the number of requests the cost leaves out (no usage, no model, or no price), and is absent while the summary is pending or failed or when the reader gives no request usage to price (0 when every request is priced or the session has none). sizeBytes is the size of the session's file, and 0 for an OpenCode, ZCode, or DimCode session, whose database file holds other sessions too.

estela_session_summary

{ traceId, agent, agentVersion?, title?, cwd?, startedAt?, endedAt?, events, skippedRecords, capabilities, numbers, unavailable, lanes, laneCount, truncated? }

FieldMeaning
eventsevents read from the log
skippedRecordslog records that became no event
capabilitieswhat this agent's log can record (Concepts)
numbersthe recorded counts among turns, requests, inputTokens, outputTokens, durationMs, compactions, subagents, failedTools
unavailablethe counts of that list this session's log does not record
lanesat most 50 lanes: { id, parentId?, title?, depth, spawnEventId?, unavailable?, requests, failedTools, compactions }; depth is 0 for the main lane, 1 for a subagent it started, and one more for each level of nesting; spawnEventId is the event that started the subagent; unavailable is true when the session records the subagent but its own log is missing or could not be read
laneCountlanes in the session

estela_list_turns

{ traceId, total, offset, nextOffset?, turns }. A turn: index, promptEventId? (absent for events before the first prompt), prompt?, start, end, firstEventId, lastEventId, events, requests, inputTokens?, outputTokens?, durationMs?, failedTools, failedToolEventIds (at most 20), compactionEventIds (at most 20), truncated?.

estela_list_requests

{ traceId, total, offset, nextOffset?, requests }. A request: id (the request event; pass it to estela_reconstruct), ts, lane, turn?, model?, inputTokens?, outputTokens?, durationMs?, finishReason?, granularity? (turn or session when the usage covers more than one model call), eventIds (the replies and tool calls it produced, at most 20), eventCount, truncated?.

estela_get_event

{ traceId, maxChars, event }. maxChars is the cap actually used. The event: id, seq, ts, kind, lane, parentId?, requestId?, shadowedBy? (the compaction that removed it from the model's context), source ({ file, line }), payload, original? (the parsed log record, with original: true), originalUnavailable? (why the record could not be read back), truncated?, omitted? (original and/or payload, left out to fit the bound; an omitted payload is returned as {}).

estela_reconstruct

{ traceId, eventId, completeness, unavailable, slots, tokens, visibleIds, visibleCount, removedIds, removedCount, truncated? }

FieldMeaning
completenessfull, or partial when a slot is unavailable
unavailablethe slot names the log does not record
slots{ name, status, eventIds, eventCount, recordedBy? } for system, tools, summary, messages, currentTurn; status is present, empty, or unavailable; recordedBy is the prompt snapshot that recorded the system prompt or tools
tokensthe recorded counts with the slots each covers: { slots, tokens, from }, where from is request.inputTokens or compaction.postTokens
visibleIds, visibleCountthe last ids the model saw (nearest the event) and their total
removedIds, removedCountthe last ids a compaction before the event removed, and their total

Bounds

BoundValue
Result size40,000 characters of JSON
List pageslimit items at most; a page ends early when the next item would pass the size bound, and nextOffset is set
Titles and project names in lists and the summary200 characters
Prompts, error reasons, paths300 characters
Other recorded strings in lists and the summary128 characters
Id lists inside an item20 ids
Lanes in the summary50
estela_get_event stringsmaxChars; if the result is still too large, maxChars is lowered in steps of 0.75 down to 256, then original and then payload are left out
estela_reconstruct id liststhe last 100 ids of each list, halved further while the result is over the bound

Every recorded string is redacted before a tool cuts it, whatever ESTELA_REDACT says, so a tool's own cut never leaves part of a home path behind. A session title and a first prompt reach the tools already cut (a title at 80 characters, a first prompt at 500) before redaction; redaction also replaces a home path such a cut left partial at their end with ~, in every spelling it knows (Privacy).

Errors

A failed call is an MCP error result (isError: true). DevFrame, the server framework, puts its own prefix in front of Estela's message, so the text a client receives reads:

Error invoking "estela_list_sessions": Error: estela_list_sessions: limit: expected an integer from 1 to 50

Estela's part of the message:

CauseMessage
invalid inputestela_<tool>: <field>: <what it expects>, or estela_<tool>: unknown argument "<key>"
unknown agentunknown agent "<id>"; this server reads <ids>
unknown trace idunknown trace id: <id>; estela_list_sessions lists the trace ids, and "current" exists only when the server was started with a session
unknown eventno event <id> in <traceId>
unknown laneno lane <id> in <traceId>; estela_session_summary lists the lanes
a session that does not loadthe load error

Every message is redacted.