MCP tool reference

Every tool the server registers, with its parameters and types. The tool descriptions and parameter tables on this page are generated directly from the server source, so they cannot drift from the code.

Conventions: most tools identify their session with a session_index — the 6-character token returned by start_session. Tools in the Bootstrap group work without one. The short catalog lives in docs/api.md; behavioral depth is in the architecture models linked from there.

Each registered MCP tool is listed below. Expand an entry for the full description and advanced parameters. This page is generated from the server source — do not hand-edit the tool bodies.

Bootstrap

Callable without a session_index.

discover

Entry point — call before other tools.

Full description

Call this first. Returns the server name, version, and the bootstrap steps for starting a workflow.

No session required. Use list_workflows to see what you can run.

No parameters.

list_workflows

List available workflows (id, title, version, tags).

Full description

Lists every workflow the server can run, with id, title, version, and tags.

If some workflow files cannot be loaded, you still get the working entries plus a load_errors list for the failures.

No parameters.

health_check

Server health: status, name, version, workflow count, uptime.

Full description

Quick ping to confirm the server is up. Returns status, name, version, workflow count, and uptime.

No session required.

No parameters.

Session

Create, inspect, and extend workflow sessions.

start_session

Start or resume a workflow session.

Full description

Opens a new workflow session or resumes an existing one.

Returns a session_index (six characters), basic workflow metadata, planning_folder_path — the absolute path agents should use for session artifacts (host bind path under Docker when HOST_PROJECTS_ROOT is set; server-local path under stdio) — and execution_path, agent: a caller walks the definition.

Pass working_directory as the absolute path of the checkout under work; the server derives owner/repo from that checkout's origin. repo is optional and must equal the derived origin when present.

With working_directory, planning lives under the top-level project folder holding that checkout, <project>/.engineering/artifacts/planning/, shared by every clone and worktree inside it.

Pass planning_folder as the absolute path of one planning folder. If it already holds session.json, the session resumes and workflow_id is ignored. A new folder must sit directly under the session's planning root, and its basename is the planning slug; a new folder anywhere else is refused, naming that root. A derived dated slug that already holds a session in that root opens the next free YYYY-MM-DD-<workflow_id>-N folder in the same call.

The variable bag is seeded with user_request, planning_folder_path, and the checkout facts host_repo_path, target_repo, component_path and is_monorepo, each path as the host path. A client this call opens, and a child dispatch_child opens, carry the same facts.

A fresh durable meta session that uniquely matches a catalog workflow, and that does not state resume intent, also dispatches that client and returns client.session_index. A durable meta start that cannot uniquely open a client returns a decision with no session_index; retry with user_request, target_workflow_id, planning_folder, or fresh. Origin binds even when the checkout folder is named for a branch.

Omit working_directory on a meta session to start a bootstrap session in a temp folder, unless planning_folder names a folder that already holds a session. Use dispatch_child later to promote it to an empty planning folder.

Child workflows are started with dispatch_child, not start_session.

ParameterTypeRequiredDescription
workflow_idstringnoWorkflow id to run or dispatch (for example, meta).
planning_folderstringnoAbsolute path of one planning folder. A folder holding a session resumes; a new folder must sit directly under the session's planning root, and its basename is the planning slug.
planning_slugstringnoSlug for the promoted planning folder when dispatching from a meta bootstrap session. Ignored if the parent already has a persistent folder.
working_directorystringnoOptional. Absolute path of the checkout under work. The bound repository is that checkout's origin. Bare/relative paths rejected.
repostringnoOptional. Target owner/repo (or github URL). When working_directory is set, must equal the derived origin. Written to session.json#repo.
user_requeststringnoThe user's free-form request that opened this session. Seeded into the variable bag as user_request, so techniques that match or classify the request read it as state instead of needing it inlined into a spawn prompt. Children inherit it via dispatch_child.
target_workflow_idstringnoOptional. Client workflow id after a workflow-selection decision. Distinct from workflow_id, which is the top-level session (default meta).
freshbooleannoOptional. After a resume-session decision, ignore saved hits and embed a new client.
agent_idstringnoAgent identity stored on the session (default "orchestrator"). Use one canonical id for solo persistent walks. Default: "orchestrator"
context_mode"persistent" | "fresh"noOptional. "persistent" = reference delivery; ONLY for solo (same agent retains payloads). Omit/"fresh" for disposable workers. Resume overwrites recorded mode.
All parameters
ParameterTypeRequiredDescription
workflow_idstringnoWorkflow id to run or dispatch (for example, meta).
planning_folderstringnoAbsolute path of one planning folder. A folder holding a session resumes; a new folder must sit directly under the session's planning root, and its basename is the planning slug.
planning_slugstringnoSlug for the promoted planning folder when dispatching from a meta bootstrap session. Ignored if the parent already has a persistent folder.
working_directorystringnoOptional. Absolute path of the checkout under work. The bound repository is that checkout's origin. Bare/relative paths rejected.
repostringnoOptional. Target owner/repo (or github URL). When working_directory is set, must equal the derived origin. Written to session.json#repo.
user_requeststringnoThe user's free-form request that opened this session. Seeded into the variable bag as user_request, so techniques that match or classify the request read it as state instead of needing it inlined into a spawn prompt. Children inherit it via dispatch_child.
target_workflow_idstringnoOptional. Client workflow id after a workflow-selection decision. Distinct from workflow_id, which is the top-level session (default meta).
freshbooleannoOptional. After a resume-session decision, ignore saved hits and embed a new client.
agent_idstringnoAgent identity stored on the session (default "orchestrator"). Use one canonical id for solo persistent walks. Default: "orchestrator"
context_mode"persistent" | "fresh"noOptional. "persistent" = reference delivery; ONLY for solo (same agent retains payloads). Omit/"fresh" for disposable workers. Resume overwrites recorded mode.

get_workflow_status

Session status (active, blocked, completed or aborted), the activities in flight, completed activities, the last checkpoint answered (its activity, checkpoint, the option chosen or dismissed, and time), and the variable bag.

Full description

Returns whether the session is active, blocked at a checkpoint, completed or aborted, plus the activities in flight, the completed activities, the last checkpoint answered and the variable bag.

ParameterTypeRequiredDescription
session_indexstringyesSix-character index a start_session or dispatch_child response returned, copied verbatim. Use the same value for every call in this session.

inspect_session

Read-only compact projection of session state (never raw session.

Full description

Read-only look at a session's stored state. Pick a view: summary (everything), identity, variables, checkpoints, activities, history, children, or usage.

Returns a compact, purpose-built projection — never the raw session file.

Pass child_index to look one level into a child session listed under triggeredWorkflows; pass variable with view: variables to read a single value.

It never changes anything and works even while the session is paused at a checkpoint — which is often exactly when you want to look.

ParameterTypeRequiredDescription
session_indexstringyesSix-character index a start_session or dispatch_child response returned, copied verbatim. Use the same value for every call in this session.
view"summary" | "identity" | "variables" | "checkpoints" | "activities" | "history" | "children" | "usage"noProjection: summary (default), identity, variables, checkpoints, activities (completed, in flight, and the outcome each reported), history, children, or usage (per-activity token rows with their basis and measured wall clock, delta totals, each agent's latest cumulative figure, the completed activities holding no row, and each child's cost outside those totals). Default: "summary"
child_indexintegernoOptional. Project triggeredWorkflows[child_index].state instead of the parent session.
variablestringnoOptional. With view=variables, return a single variable by name.
agent_idstringnoOptional. Narrow history and usage projections to events/rows whose data.agentId matches this worker context.

dispatch_child

Start a child workflow inside the current session.

Full description

Starts a child workflow inside the parent session you are already in.

Returns the child's session_index, planning_folder_path, and execution_path. The child's variables are seeded from the child workflow's defaults plus the parent's user_request; the parent records the child under triggeredWorkflows.

Also returns workflow.initialActivity — the activity the child's first next_activity should name. A parent knows its own workflow's first activity, not its child's, and get_workflow stays where a session reads its own metadata, so this carries the child's across the boundary.

The child state is stored inside the parent's session.json under triggeredWorkflows.

When the parent is a temporary meta-bootstrap session, the server first promotes it to an empty planning folder on disk, then embeds the child. You can keep using the parent's original session_index.

Promoting from a temporary parent onto a folder that already holds a session is refused as FOLDER_OCCUPIED; both session files are left untouched. A persistent parent appends a second child.

ParameterTypeRequiredDescription
session_indexstringyesSix-character index a start_session or dispatch_child response returned, copied verbatim. Use the same value for every call in this session.
workflow_idstringyesWorkflow id to run or dispatch (for example, meta).
agent_idstringnoChild agent_id (default "worker"). Default: "worker"
repostringnoBind owner/repo onto the parent session when missing (must match if already set). session.json#repo is the source of truth.
context_mode"persistent" | "fresh"noOptional. Child delivery mode. "persistent" ONLY for solo child walks; omit/"fresh" for worker-dispatched walks.

Workflow and activity navigation

Load workflow structure and advance through activities.

get_workflow

Orchestrator tool: load the session workflow.

Full description

Loads the workflow definition for the current session.

The response starts with the orchestrator technique, then a separator, then metadata: rules, variables, initialActivity (the first activity to run), and a short list of all activities.

Use initialActivity for your first next_activity call — this is where a session reads its own. (dispatch_child returns the *child's*, for the parent to hand across.)

Also returns planning_folder_path (host bind path under Docker when HOST_PROJECTS_ROOT is set). Treat this as the one true artifact location; do not build paths relative to your own working directory.

If some activity files failed to load, activity_load_errors lists them and those activities are omitted from the list.

ParameterTypeRequiredDescription
session_indexstringyesSix-character index a start_session or dispatch_child response returned, copied verbatim. Use the same value for every call in this session.

next_activity

Orchestrator tool: transition to activity_id (does not return the activity body — the worker calls get_activity).

Full description

Moves the session to a new activity. This is the orchestrator's advance call — it updates state and records the trace but does not return the activity body.

After next_activity, the worker should call get_activity to load steps, checkpoints, exits, and technique references.

For the first transition, use initialActivity from get_workflow. After that, take the exit the activity reports and read its destination from the graph in get_workflow — one activity, or the branches a fanning exit opens, passed on as the graph gives them. Every call but the first names the activity it is returning.

Optional step_manifest and exit help the server validate what you completed. Manifest checks are advisory — mismatches produce warnings, not hard errors.

ParameterTypeRequiredDescription
session_indexstringyesSix-character index a start_session or dispatch_child response returned, copied verbatim. Use the same value for every call in this session.
activity_idstring | (string | object)[] | 1yesWhere the run goes next, read from the graph where the graph states it: naming from_activity and exit together settles the destination, including its shape, so an exit the graph fans opens one branch per element of the collection it names whatever this field holds. What this field decides is the walk's opening, where nothing is retired yet — the initialActivity that start_session and get_workflow both report — and a call naming no exit the retiring activity declares, as an activity id or __terminal__. A fan opens only on an exit the graph binds to it, so a list or instance fan here with no binding behind it is refused.
from_activitystringnoThe activity this call is exiting — the one exit, step_manifest, variables_changed and artifacts_produced belong to, instance-qualified (challenge-pass#1) where the graph runs that activity once per element of a collection. Required whenever anything is in flight, which is every call but a session's first, so a call always names the activity it is returning rather than leaving the server to infer it. Omitted only on that first call, when the frontier is empty.
exitstringnoName of the exit the previous activity took.
step_manifestobject[]noSteps completed in the previous activity, for example [{ "step_id": "check-inputs", "output": { "inputs_valid": true } }]. Omit if no steps ran.
activity_manifestobject[]noHistory of completed activities with their outcomes and the exit each took.
variables_changedobjectnoVariable assignments the completing activity produced — relay the worker's activity_complete variables_changed map verbatim. The server writes them into the session variable bag and records one variable_set history event per name, so the bag a later get_workflow_status / inspect_session returns reflects worker outputs and survives a lost agent context. Declared types are validated warn-only: a mismatch is stored as written and surfaced in _meta.validation. Omit when the activity changed nothing.
artifacts_producedobject[]noArtifacts the completing activity produced: [{id, name, path?}]. Merged by id into the session declared-artifact accumulation; planning-folder reconciliation joins on id (warn-only).
agent_idstringnoOptional. Worker context that completed the exiting activity — scopes technique-fetch fidelity and step_completed attribution.
context_tokensintegernoOptional, with agent_id. That context's declared window, so _meta.batch reports whether it may take this activity — a reading that counts the lazy fetches the exiting activity made. Continue the worker on may_continue: true; spawn a fresh agent_id otherwise.
progress_publishedbooleannoWhether the in-progress Progress mark for this activity is committed and pushed before the worker spawns. Recorded as a progress_published event, so an activity opened without one is answerable from the session rather than only from whoever was watching the working tree at the time. Omit only where the session has no planning folder to mark.
Nested fields

Each item in these arrays is an object with the fields below.

InFieldTypeRequiredDescription
step_manifest[]step_idstringyesStep id from the activity definition (field name is step_id, not id).
outputobjectyesWhat the step produced, as a JSON object keyed by the output id the bound technique declares — one output included. A key the technique does not declare is surfaced in _meta.validation.
activity_manifest[]activity_idstringyesCompleted activity id.
outcomestringyesShort outcome summary for that activity.
exitstringnoExit that activity took, if any.
artifacts_produced[]idstringyes-
namestringyes-
pathstringno-

get_activity

Load the current activity definition, including steps and exits.

Full description

Loads the full definition for the activity this context was dispatched for. Name it with activity_id where several are in flight; omit it on an ordinary walk, where the server reads the one activity from session state.

You must pass context_tokens: your worker's context window size in tokens. The server uses this to decide how many step techniques to bundle inline.

Step-bound techniques whose gate answers true, and that fit the budget, are included in the response under step_techniques — the same content you would get from get_technique for that step. A step whose gate is false or unanswered, and a technique past the budget, still needs a separate get_technique call.

If the session uses persistent context mode (or you pass bundle: "reference"), content you already received may come back as short unchanged markers instead of full text. Pass bundle: "full" to force full delivery.

_meta.batch reports where your context stands against its batch bound: how many activities it has taken, what it has been delivered, may_continue, and, where bounded is true, the cap and the budget. On may_continue: false, finish this activity and report it — asking for another is refused with the payload undelivered, and the orchestrator dispatches a fresh worker under a new agent_id.

ParameterTypeRequiredDescription
session_indexstringyesSix-character index a start_session or dispatch_child response returned, copied verbatim. Use the same value for every call in this session.
context_tokensintegeryesREQUIRED. Caller's context window in tokens; sets the eager step-technique bundling budget for this activity and the cumulative batch budget across the run this context is walking. Per-call, never defaulted — omitting it is a validation error.
agent_idstringnoOptional. Identity of the AGENT CONTEXT making this call — mint one per dispatched worker and reuse it verbatim for that worker's whole life, resuming it after a gate and advancing it to the next activity of its batch. Scopes the delivery ledger (and the dispatch record) to that context: a fresh id gets full delivery, a reused id gets unchanged-references for what that context already received. Omit for solo walks. Never rebinds the session agent.
activity_idstringnoThe activity this context was dispatched for, instance-qualified (challenge-pass#1) where the graph runs that activity once per element of a collection. Required whenever several activities are in flight; omit it on an ordinary walk. A name the session is not on is refused rather than served, so a branch is never quietly handed a sibling's body.
bundle"reference" | "full"noreference: return unchanged markers for content already delivered. full: always return complete text.

Checkpoint flow

Yield to the orchestrator, present decisions to the user, and resume.

yield_checkpoint

Worker tool: mark a checkpoint active and yield to the orchestrator (emit an empty <checkpoint_yield> block, which hands control up the chain; the user-facing agent reads the open checkpoint from the server with present_checkpoint).

Full description

Call when a checkpoint step tells you to stop and hand control to the orchestrator.

Records the checkpoint as active. Emit an empty <checkpoint_yield> block in your output, which hands control up the chain; the user-facing agent reads the open checkpoint with present_checkpoint.

ParameterTypeRequiredDescription
session_indexstringyesSix-character index a start_session or dispatch_child response returned, copied verbatim. Use the same value for every call in this session.
checkpoint_idstringyesId of the checkpoint step you are yielding.
messagestringnoOnly for a decision the activity does not declare: the question put to the user. Forbidden on a declared checkpoint, whose definition owns the wording.
optionsobject[]noOnly for a decision the activity does not declare: at least two answers. The decision is recorded; an option here sets no variable, so a value the run must read belongs on a declared checkpoint.
variables_changedobjectnoValues the steps before this gate produced, as a name → value map. The server writes them into the session variable bag and records one variable_set history event per name, so a gate whose message interpolates a value its own activity produced has that value to render, and the orchestrator reads it when presenting. Declared types are validated warn-only: a mismatch is stored as written and surfaced in _meta.validation. Omit when no step before the gate produced anything.
Nested fields

Each item in these arrays is an object with the fields below.

InFieldTypeRequiredDescription
options[]idstringyesOption id the orchestrator answers with.
labelstringyesOption text shown to the user.
descriptionstringnoWhat choosing this option means.

resume_checkpoint

Worker tool: continue after the orchestrator resolves a checkpoint.

Full description

Call after the orchestrator resolves a checkpoint and resumes you.

Verifies the checkpoint is cleared and returns the checkpoint answered, the option chosen, the variable updates to apply, and the exit the option selected, if any. Where that exit carries ends_activity, run none of the remaining steps and report the ones you ran.

ParameterTypeRequiredDescription
session_indexstringyesSix-character index a start_session or dispatch_child response returned, copied verbatim. Use the same value for every call in this session.

present_checkpoint

Load the active checkpoint (message, options, effects, auto-advance) for presenting to the user.

Full description

Loads the active checkpoint's message, options, and effects so you can show it to the user.

Reads from state.activeCheckpoint — no separate checkpoint handle is needed.

ParameterTypeRequiredDescription
session_indexstringyesSix-character index a start_session or dispatch_child response returned, copied verbatim. Use the same value for every call in this session.

respond_checkpoint

Clear the active-checkpoint gate.

Full description

Submits the user's checkpoint decision and clears the active checkpoint.

Present the checkpoint to the user and wait for input before calling this.

Provide exactly one of: option_id (user picked an option), auto_advance (timer elapsed on a checkpoint with a default), or condition_not_met (conditional checkpoint whose condition was false).

Variable effects from the chosen option are applied; type mismatches produce warnings in _meta.validation but do not block the response.

An option whose effect declares recordReply takes the text the user typed as reply, stored in that variable. reply is refused with any other option.

ParameterTypeRequiredDescription
session_indexstringyesSix-character index a start_session or dispatch_child response returned, copied verbatim. Use the same value for every call in this session.
option_idstringnoOption the user selected. Must match one of the checkpoint's defined options.
replystringnoText the user typed with option_id. Required when that option declares recordReply, refused otherwise.
auto_advancebooleannoSet true to use the checkpoint's default option after its timer elapses.
condition_not_metbooleannoSet true to dismiss a conditional checkpoint whose condition evaluated to false.

Techniques and resources

Fetch technique definitions and lazy-loaded reference material.

get_technique

Load one technique (step-bound when step_id is set, named when technique_id is; otherwise the activity's or workflow's first).

Full description

Fetches one technique for the current workflow or activity.

Before any activity is active, returns the workflow's first technique. During an activity, use step_id to fetch a specific step's technique, or omit step_id for the activity's first technique.

The response carries the technique body with its own rules, naming its ancestors in inherits; each ancestor scope's shared inputs, outputs and rules arrive once under contracts, plus binding annotations when fetched via a step.

Techniques load one at a time. In persistent context mode, an identical refetch may return a short unchanged marker; pass full: true to get the full payload again.

Every fetch is recorded for trace and advisory manifest checks on the next next_activity call.

ParameterTypeRequiredDescription
session_indexstringyesSix-character index a start_session or dispatch_child response returned, copied verbatim. Use the same value for every call in this session.
agent_idstringnoOptional. Identity of the AGENT CONTEXT making this call — mint one per dispatched worker and reuse it verbatim for that worker's whole life, resuming it after a gate and advancing it to the next activity of its batch. Scopes the delivery ledger (and the dispatch record) to that context: a fresh id gets full delivery, a reused id gets unchanged-references for what that context already received. Omit for solo walks. Never rebinds the session agent.
technique_idstringnoOptional. A technique of your role's contract, by the id it is keyed under — a protocol you have reached and were not sent (a checkpoint you are about to raise that your activity never declared), or one whose delivery your context no longer holds. Only techniques this session's roles name are servable; anything else is refused. Not for a step's own technique, which step_id addresses.
step_idstringnoStep within the current activity. Omit to get the first technique for the activity or workflow.
activity_idstringnoOptional. The activity you were dispatched for. A step id resolves against the session's CURRENT activity, so passing this turns a pointer that has moved on into an error instead of a technique from the wrong activity.
bundle"reference" | "full"noreference: return unchanged markers for content already delivered. full: always return complete text.
fullbooleannoForce full content even when persistent mode would return an unchanged marker (get_technique or get_resource).
All parameters
ParameterTypeRequiredDescription
session_indexstringyesSix-character index a start_session or dispatch_child response returned, copied verbatim. Use the same value for every call in this session.
agent_idstringnoOptional. Identity of the AGENT CONTEXT making this call — mint one per dispatched worker and reuse it verbatim for that worker's whole life, resuming it after a gate and advancing it to the next activity of its batch. Scopes the delivery ledger (and the dispatch record) to that context: a fresh id gets full delivery, a reused id gets unchanged-references for what that context already received. Omit for solo walks. Never rebinds the session agent.
technique_idstringnoOptional. A technique of your role's contract, by the id it is keyed under — a protocol you have reached and were not sent (a checkpoint you are about to raise that your activity never declared), or one whose delivery your context no longer holds. Only techniques this session's roles name are servable; anything else is refused. Not for a step's own technique, which step_id addresses.
step_idstringnoStep within the current activity. Omit to get the first technique for the activity or workflow.
activity_idstringnoOptional. The activity you were dispatched for. A step id resolves against the session's CURRENT activity, so passing this turns a pointer that has moved on into an error instead of a technique from the wrong activity.
bundle"reference" | "full"noreference: return unchanged markers for content already delivered. full: always return complete text.
fullbooleannoForce full content even when persistent mode would return an unchanged marker (get_technique or get_resource).

get_resource

Load a resource by id (optional #section).

Full description

Loads reference material by id — templates, guides, or other markdown resources linked from techniques.

Bare ids (review-mode) resolve within the current workflow. Prefixed ids (meta/bootstrap-protocol) load from another workflow.

Add #section to fetch one heading slice instead of the whole file.

In persistent context mode, an identical refetch of the same resource_id (including any #section) may return a short unchanged marker; pass full: true to get the full body again.

Each fetch is logged for observability only (including when the answer is an unchanged marker); nothing validates that you called it.

ParameterTypeRequiredDescription
session_indexstringyesSix-character index a start_session or dispatch_child response returned, copied verbatim. Use the same value for every call in this session.
agent_idstringnoOptional. Identity of the AGENT CONTEXT making this call — mint one per dispatched worker and reuse it verbatim for that worker's whole life, resuming it after a gate and advancing it to the next activity of its batch. Scopes the delivery ledger (and the dispatch record) to that context: a fresh id gets full delivery, a reused id gets unchanged-references for what that context already received. Omit for solo walks. Never rebinds the session agent.
resource_idstringyesResource slug, optionally workflow-prefixed (meta/style-guide), optionally with #section anchor.
bundle"reference" | "full"noreference: return unchanged markers for content already delivered. full: always return complete text.
fullbooleannoForce full content even when persistent mode would return an unchanged marker (get_technique or get_resource).

Trace

Execution history and per-dispatch cost accounting.

get_trace

Retrieve the session execution trace.

Full description

Returns the tool-call history for debugging or audit.

Pass accumulated trace_tokens from next_activity responses to reconstruct a specific segment. Omit them to read the live in-memory trace for the session.

ParameterTypeRequiredDescription
session_indexstringyesSix-character index a start_session or dispatch_child response returned, copied verbatim. Use the same value for every call in this session.
trace_tokensstring[]noTokens collected from next_activity _meta.trace_token responses.
agent_idstringnoOptional. Keep only trace events whose aid equals this worker context.

record_usage

Orchestrator tool: record harness-reported token usage for ONE completed ACTIVITY, on the basis the harness reports it: that activity's own spend, or the context's running total.

Full description

Orchestrator tool: record harness-reported token usage for ONE completed ACTIVITY, on the basis the harness reports it: that activity's own spend, or the context's running total. Call at every activity boundary — the first worker, a continue, a fresh worker after a timeout, a resume after a checkpoint yield, an out-of-band dispatch, and the terminal activity; a dispatch carrying a run of activities records one call per activity it covers. Optional agent_id attributes the row to a worker context.

ParameterTypeRequiredDescription
session_indexstringyesSix-character index a start_session or dispatch_child response returned, copied verbatim. Use the same value for every call in this session.
activitystringyesActivity this figure is attributed to, whether or not the session is still on it. One call per activity a dispatch covers.
usageobjectyesHarness-reported token figure for this ONE activity, as reported. Omit the call entirely when the harness surfaced nothing rather than passing zeros — the worker cannot self-measure, so absence must stay distinguishable from a measured zero.
basis"delta" | "cumulative"yesWhat the figure counts. delta is this activity's own spend and sums with its siblings. cumulative is a running total for this agent context, which several harnesses report — those are carried as the latest figure per agent, since summing them counts every earlier activity again. Read the harness output rather than assuming: a cumulative figure passed as a delta is what makes a total wrong in a direction nothing reveals.
agent_idstringnoOptional. Worker context that incurred this usage — the same identity used on get_activity for that dispatch. Stored as data.agentId on the activity_usage event so inspect_session can filter and attribute rows, and so the rows of one batched dispatch are readable as a group. Omit when attribution is unknown; the row remains valid as an unattributed bucket.