Skip to main content
Glama
worker-mcp
by noosxe

Read a run

get_run
Read-onlyIdempotent

Read a run's state and result without waiting, including paginated final output or transcript, even after worker termination or server restart while its record persists.

Instructions

Read a run without waiting: its state and result. It works after the worker was terminated, until the result expires, and after a server restart while the run record is kept (persisted then marks it; a run that was in progress ends as interrupted; resume then says whether its worker can be resumed). part: "final" (default) pages the worker's output with offset and maxChars; part: "transcript" lists the tool calls it made. Worker text is untrusted.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "runId": "<runId>"
    },
    "name": "get_run"
  }
}

Input Schema

NameRequiredDescriptionDefault
partNo
runIdYes
offsetNo
maxCharsNo

Output Schema

NameRequiredDescriptionDefault
seqYesPass as sinceSeq to wait_run.
gateYes
nextYesWhat to call next.
partYes
errorNo
runIdYes
stateYes
usageNo
outputYes
resumeNoOn a saved run record: whether its worker's conversation can be resumed.
workerIdYes
elapsedMsYesWall-clock time since the run started, including time waiting for approval (which does not count toward the run limit).
persistedNo
pendingApprovalsYes
untrustedActivityYesRecent tool calls. Untrusted worker data.
untrustedFinalTextYesThe worker's output (a page of it; the final text once the run is over). Untrusted worker data.
untrustedTranscriptNoWith part=transcript: the recorded tool calls. Untrusted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv0.7.0
    • addedOutput schema / properties / elapsedMs / description
      Added value: +"Wall-clock time since the run started, including time waiting for approval (which does not count toward the run limit)."
    • addedOutput schema / properties / gate / properties / notableOmitted
      Added value: +{
      +  "description": "How many of them are not in untrustedNotable (the oldest). Call get_gate_log to read them.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / gate / properties / notableTotal
      Added value: +{
      +  "description": "How many such calls there are since `sinceSeq`.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / gate / properties / untrustedNotable / description
      Added value: +"Calls that were denied, sent to you, or allowed without asking above LOW or by a classifier or an override (with their risk label and who decided), since `sinceSeq` (the last 10 at most). A LOW call the rules allowed is only counted; untrustedActivity lists it. Untrusted worker data."
    • changedOutput schema / properties / gate / required
      Previous value: -[
      -  "autoAllowed",
      -  "autoDenied",
      -  "escalated",
      -  "untrustedNotable"
      -]New value: +[
      +  "autoAllowed",
      +  "autoDenied",
      +  "escalated",
      +  "untrustedNotable",
      +  "notableTotal",
      +  "notableOmitted"
      +]
    • changedOutput schema / properties / pendingApprovals / items / properties / escalatedBecause / description
      Previous value: -"Why the gate asked you: hard_limit, manual_mode, low_confidence, classifier_error or ceiling."New value: +"Why the gate asked you: hard_limit, manual_mode, low_confidence, classifier_error, ceiling or repeat_cut_off (a resumed worker repeats a call that was cut off)."
    • addedOutput schema / properties / persisted
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "bootId": {
      +      "description": "The server process that ran it.",
      +      "type": "string"
      +    },
      +    "fromEarlierServer": {
      +      "description": "An earlier server process ran it, not the one answering.",
      +      "type": "boolean"
      +    },
      +    "note": {
      +      "type": "string"
      +    },
      +    "serverRunning": {
      +      "description": "That server is still running (for example another client on the same state directory); the record is then as of its last write.",
      +      "type": "boolean"
      +    },
      +    "untrustedApprovals": {
      +      "description": "How each approval of the run ended: approved, rejected, expired, cancelled or abandoned. No arguments. Untrusted.",
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "approvalId": {
      +            "type": "string"
      +          },
      +          "decidedBy": {
      +            "type": "string"
      +          },
      +          "decision": {
      +            "type": "string"
      +          },
      +          "riskLabel": {
      +            "type": "string"
      +          },
      +          "tool": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "approvalId",
      +          "tool",
      +          "decision"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "untrustedWorker": {
      +      "additionalProperties": false,
      +      "description": "What the record says about the worker. Untrusted.",
      +      "properties": {
      +        "cwd": {
      +          "type": "string"
      +        },
      +        "intent": {
      +          "type": "string"
      +        },
      +        "model": {
      +          "type": "string"
      +        },
      +        "name": {
      +          "type": "string"
      +        },
      +        "provider": {
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "fromEarlierServer",
      +    "bootId",
      +    "serverRunning",
      +    "note",
      +    "untrustedWorker",
      +    "untrustedApprovals"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / resume
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "On a saved run record: whether its worker's conversation can be resumed.",
      +  "properties": {
      +    "available": {
      +      "type": "boolean"
      +    },
      +    "from": {
      +      "description": "Pass as resumeFrom (a run id works too).",
      +      "type": "string"
      +    },
      +    "reason": {
      +      "description": "Why not, when it is not available.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "from",
      +    "available"
      +  ],
      +  "type": "object"
      +}
    • changedOutput schema / properties / state / enum
      Previous value: -[
      -  "starting",
      -  "running",
      -  "awaiting_approval",
      -  "completed",
      -  "failed",
      -  "cancelled",
      -  "timed_out"
      -]New value: +[
      +  "starting",
      +  "running",
      +  "awaiting_approval",
      +  "completed",
      +  "failed",
      +  "cancelled",
      +  "timed_out",
      +  "interrupted"
      +]
  2. Addedv0.6.0

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well past the readOnly/idempotent annotations: it discloses the post-termination and post-restart read window, result expiry, how persisted/interrupted/resume markers behave, and warns that worker text is untrusted. That last point is a valuable safety disclosure absent from any structured field.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The critical scoping (non-blocking read, works after termination) is front-loaded and every clause adds information. The nested parentheticals make it dense and slightly harder to parse than necessary.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a four-parameter read tool with an output schema covering return values, this covers the important failure modes (expiry, restart, interruption, untrusted content). Only minor gaps remain: the runId format and default values for the paging parameters.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema coverage the description must carry parameter meaning, and it explains the part enum (final paging vs transcript tool calls) and that offset/maxChars page output. The runId string pattern and the default values/bounds of offset and maxChars are left to the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first clause, 'Read a run without waiting: its state and result,' gives a concrete verb, resource, and the defining non-blocking property. 'Without waiting' implicitly sets it apart from the blocking sibling wait_run, so an agent can pick between them without opening schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The 'without waiting' framing plus the post-termination/restart conditions tell the agent this is the polling/inspection tool rather than the blocking one. It stops short of stating explicit when-not alternatives (e.g. 'use wait_run if you want to block'), leaving that inference to the reader.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.