Skip to main content
Glama

Get run result

get_run_result
Destructive

Retrieve an agent run's status, progress, costs, tokens, and final result, including reply text and files. Optionally wait for the run to finish, then get failure causes and retry guidance.

Instructions

Get a run's status, timing, attributed credits (micro-US-dollars) and tokens, and what it is doing while it runs: last_worklog (the agent's own most recent note), last_tool_step ("running ", or "completed " between calls), last_activity_at, and tool_progress (active calls, last completion time, completed-call count) when telemetry exists. With wait=true it holds your turn until the run finishes, pauses for input, or the hold ends (contract in the server instructions; wait_seconds bounds it). A completed run includes the reply text and a url to its session; files the reply linked come back as absolute URLs in the text and as a "files" list, fetched with the same bearer token you called this tool with. A failed or cancelled run includes its cause, whether it is retryable, and an "error" object saying what happened, whether the work was charged and what to do next. Status "awaiting_input" includes the pending request for answer_pending_input. Once that request is answered, input_status reads "answered" and continuation_run_id names the run to poll next; "cancelled" or "expired" means the run will never resume, so stop polling it. Keep polling a non-terminal run at poll_after_seconds.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
waitNoWhen true, wait for a terminal result or human input (see this tool's description for how long the hold lasts). After this tool returns, continue polling while status is non-terminal; it cannot wake an idle client.
run_idYesThe run id returned by invoke_agent.
agent_idYesThe agent's UUID.
wait_secondsNoOptional: how many seconds to wait when wait=true (maximum 1800). Omit to use the window your MCP client can hold.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoA deep link to this run's session in the plori web app.
hintNoWhat to do next with this run, in one sentence. Present only while the run is non-terminal.
textNoThe assistant's reply once the run has finished. While a run is still going this is the run's own status message, not an answer, and is often absent — read last_worklog and last_tool_step instead.
causeNoMachine-readable cause for a non-normal terminal state.
errorNoWhy a terminal error or cancelled run failed, whether it was charged and what to do about it. Absent for a run that is still going or that finished normally.
filesNoFiles on the agent's disk that this reply linked, in the order they appear. Each url is fetchable with the bearer token you called this tool with. Absent when the reply linked none.
run_idYesThe public run identifier.
statusYesThe current run status.
tokensNoAttributed token count; null when attribution is unavailable.
advisorNoAdvisor calls used and allowed, spend this turn, and its optional spend cap in micro-US-dollars.
creditsNoAttributed spend in micro-US-dollars; null when attribution is unavailable.
ended_atNoWhen the run reached a terminal state.
retryableNoWhether sending the same message again could plausibly succeed. False for a cause the same request would hit again, including time_limit — split the work or raise max_turn_seconds instead of retrying it unchanged.
session_idYesThe durable conversation/session identifier.
started_atNoWhen the run started.
stop_reasonNoController-selected stop reason, when present.
input_statusNoThe durable status of this run's human-input request, when it has one: pending, answered, cancelled or expired. cancelled and expired are terminal — that run will never resume, so stop polling it.
last_worklogNoThe agent's most recent one-sentence note about what it is doing, from the run's durable event log. Absent for a terminal result and for a run that has written none.
input_expiredNoTrue when this run is parked on a question its session has already moved past: a later run in the same conversation has completed. Do not answer it; start a new run instead.
poll_after_msNoLegacy spelling of poll_after_seconds in milliseconds; the two always agree. Prefer poll_after_seconds.
resume_run_idNoThe exact auto-resume successor for an interrupted run; poll this run next.
resume_statusNoAuto-resume disposition for an interrupted run: pending, resumed, failed, or unknown.
tool_progressNoDurable tool execution progress; absent when this run has no tool-progress telemetry.
usage_by_roleNoAttributed spend, tokens, and model-call counts split into executor, advisor, and reviewer roles.
last_tool_stepNoWhat this run last did with a tool: "running <tool>" while a call is in flight, otherwise "completed <tool>" for the most recent finished call. Absent for a terminal result and for a run with no tool-progress telemetry.
pending_inputsNoHuman inputs blocking an awaiting_input run.
elapsed_secondsNoSeconds since the run started; absent for a terminal result.
upstream_statusNoThe model provider's HTTP status when this run died on an upstream fault; absent otherwise.
last_activity_atNoWhen the run last wrote a note or finished a tool call. Absent for a terminal result and for a run that has done neither.
last_heartbeat_atNoMost recent durable executor heartbeat.
poll_after_secondsNoSuggested seconds before polling again, paced to this run's recent tool-completion rate; absent for a terminal result.
continuation_run_idNoThe exact continuation created for an answered input; poll this run next.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.16.2
    • addedOutput schema / properties / advisor
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Advisor calls used and allowed, spend this turn, and its optional spend cap in micro-US-dollars.",
      +  "properties": {
      +    "calls_allowed": {
      +      "type": "integer"
      +    },
      +    "calls_used": {
      +      "type": "integer"
      +    },
      +    "spend_cap_micro_usd": {
      +      "type": [
      +        "null",
      +        "integer"
      +      ]
      +    },
      +    "spend_micro_usd": {
      +      "description": "Gross advisor consumption for the turn; the cap compares against this amount.",
      +      "type": "integer"
      +    }
      +  },
      +  "required": [
      +    "calls_used",
      +    "calls_allowed",
      +    "spend_micro_usd"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / error / properties / upgrade
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Which plan lifts the limit this run ended at, when it ended at one.",
      +  "properties": {
      +    "anonymous": {
      +      "type": "boolean"
      +    },
      +    "limit": {
      +      "type": "string"
      +    },
      +    "message": {
      +      "type": "string"
      +    },
      +    "offer": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "discount_code": {
      +          "type": "string"
      +        },
      +        "first_period_price_micro_usd": {
      +          "type": "integer"
      +        },
      +        "message": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "discount_code",
      +        "first_period_price_micro_usd",
      +        "message"
      +      ],
      +      "type": [
      +        "null",
      +        "object"
      +      ]
      +    },
      +    "plan": {
      +      "type": "string"
      +    },
      +    "remedies": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "kind": {
      +            "type": "string"
      +          },
      +          "limits": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "disk_gb": {
      +                "type": "integer"
      +              },
      +              "max_active_workflows": {
      +                "type": "integer"
      +              },
      +              "max_agents": {
      +                "type": "integer"
      +              },
      +              "max_concurrent_runs": {
      +                "type": "integer"
      +              }
      +            },
      +            "required": [
      +              "max_concurrent_runs",
      +              "max_agents",
      +              "max_active_workflows",
      +              "disk_gb"
      +            ],
      +            "type": [
      +              "null",
      +              "object"
      +            ]
      +          },
      +          "message": {
      +            "type": "string"
      +          },
      +          "offer": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "discount_code": {
      +                "type": "string"
      +              },
      +              "first_period_price_micro_usd": {
      +                "type": "integer"
      +              },
      +              "message": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "discount_code",
      +              "first_period_price_micro_usd",
      +              "message"
      +            ],
      +            "type": [
      +              "null",
      +              "object"
      +            ]
      +          },
      +          "plan": {
      +            "type": "string"
      +          },
      +          "url": {
      +            "type": "string"
      +          },
      +          "usd_cents_per_month": {
      +            "type": "integer"
      +          }
      +        },
      +        "required": [
      +          "kind",
      +          "message"
      +        ],
      +        "type": "object"
      +      },
      +      "type": [
      +        "null",
      +        "array"
      +      ]
      +    },
      +    "url": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "limit",
      +    "plan",
      +    "message",
      +    "remedies"
      +  ],
      +  "type": [
      +    "null",
      +    "object"
      +  ]
      +}
    • addedOutput schema / properties / usage_by_role
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Attributed spend, tokens, and model-call counts split into executor, advisor, and reviewer roles.",
      +  "properties": {
      +    "advisor": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "calls": {
      +          "type": "integer"
      +        },
      +        "credits": {
      +          "type": "integer"
      +        },
      +        "tokens": {
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "credits",
      +        "tokens",
      +        "calls"
      +      ],
      +      "type": "object"
      +    },
      +    "executor": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "calls": {
      +          "type": "integer"
      +        },
      +        "credits": {
      +          "type": "integer"
      +        },
      +        "tokens": {
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "credits",
      +        "tokens",
      +        "calls"
      +      ],
      +      "type": "object"
      +    },
      +    "reviewer": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "calls": {
      +          "type": "integer"
      +        },
      +        "credits": {
      +          "type": "integer"
      +        },
      +        "tokens": {
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "credits",
      +        "tokens",
      +        "calls"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "executor",
      +    "advisor",
      +    "reviewer"
      +  ],
      +  "type": [
      +    "null",
      +    "object"
      +  ]
      +}
  2. Changed3 schema fields changedv0.16.0
    • addedInput schema / properties / wait
      Added value: +{
      +  "description": "When true, wait for a terminal result or human input (see this tool's description for how long the hold lasts). After this tool returns, continue polling while status is non-terminal; it cannot wake an idle client.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / wait_seconds
      Added value: +{
      +  "description": "Optional: how many seconds to wait when wait=true (maximum 1800). Omit to use the window your MCP client can hold.",
      +  "maximum": 1800,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "cause": {
      +      "description": "Machine-readable cause for a non-normal terminal state.",
      +      "type": "string"
      +    },
      +    "continuation_run_id": {
      +      "description": "The exact continuation created for an answered input; poll this run next.",
      +      "type": "string"
      +    },
      +    "credits": {
      +      "description": "Attributed spend in micro-US-dollars; null when attribution is unavailable.",
      +      "type": [
      +        "null",
      +        "integer"
      +      ]
      +    },
      +    "elapsed_seconds": {
      +      "description": "Seconds since the run started; absent for a terminal result.",
      +      "type": "integer"
      +    },
      +    "ended_at": {
      +      "description": "When the run reached a terminal state.",
      +      "type": [
      +        "null",
      +        "string"
      +      ]
      +    },
      +    "error": {
      +      "additionalProperties": false,
      +      "description": "Why a terminal error or cancelled run failed, whether it was charged and what to do about it. Absent for a run that is still going or that finished normally.",
      +      "properties": {
      +        "class": {
      +          "description": "The failure class: the run's terminal cause, or \"unknown\" when none was recorded.",
      +          "type": "string"
      +        },
      +        "message": {
      +          "description": "What happened, and whether the work was charged.",
      +          "type": "string"
      +        },
      +        "next_step": {
      +          "description": "What to do about it.",
      +          "type": "string"
      +        },
      +        "retryable": {
      +          "description": "Whether sending the same message again could plausibly succeed.",
      +          "type": "boolean"
      +        }
      +      },
      +      "required": [
      +        "class",
      +        "message",
      +        "retryable",
      +        "next_step"
      +      ],
      +      "type": [
      +        "null",
      +        "object"
      +      ]
      +    },
      +    "files": {
      +      "description": "Files on the agent's disk that this reply linked, in the order they appear. Each url is fetchable with the bearer token you called this tool with. Absent when the reply linked none.",
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "path": {
      +            "description": "The file's path on the agent's disk, rooted at the disk root.",
      +            "type": "string"
      +          },
      +          "url": {
      +            "description": "An absolute URL that streams the file's bytes, text or binary and of any size, with its own content type. Fetch it with the same bearer token you called this tool with.",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "path",
      +          "url"
      +        ],
      +        "type": "object"
      +      },
      +      "type": [
      +        "null",
      +        "array"
      +      ]
      +    },
      +    "hint": {
      +      "description": "What to do next with this run, in one sentence. Present only while the run is non-terminal.",
      +      "type": "string"
      +    },
      +    "input_expired": {
      +      "description": "True when this run is parked on a question its session has already moved past: a later run in the same conversation has completed. Do not answer it; start a new run instead.",
      +      "type": "boolean"
      +    },
      +    "input_status": {
      +      "description": "The durable status of this run's human-input request, when it has one: pending, answered, cancelled or expired. cancelled and expired are terminal — that run will never resume, so stop polling it.",
      +      "type": "string"
      +    },
      +    "last_activity_at": {
      +      "description": "When the run last wrote a note or finished a tool call. Absent for a terminal result and for a run that has done neither.",
      +      "type": [
      +        "null",
      +        "string"
      +      ]
      +    },
      +    "last_heartbeat_at": {
      +      "description": "Most recent durable executor heartbeat.",
      +      "type": [
      +        "null",
      +        "string"
      +      ]
      +    },
      +    "last_tool_step": {
      +      "description": "What this run last did with a tool: \"running <tool>\" while a call is in flight, otherwise \"completed <tool>\" for the most recent finished call. Absent for a terminal result and for a run with no tool-progress telemetry.",
      +      "type": "string"
      +    },
      +    "last_worklog": {
      +      "description": "The agent's most recent one-sentence note about what it is doing, from the run's durable event log. Absent for a terminal result and for a run that has written none.",
      +      "type": "string"
      +    },
      +    "pending_inputs": {
      +      "description": "Human inputs blocking an awaiting_input run.",
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "consent_tool": {
      +            "type": "string"
      +          },
      +          "kind": {
      +            "type": "string"
      +          },
      +          "prompt": {
      +            "type": "string"
      +          },
      +          "risk": {
      +            "type": "string"
      +          },
      +          "tool_call_id": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "tool_call_id",
      +          "kind",
      +          "prompt"
      +        ],
      +        "type": "object"
      +      },
      +      "type": [
      +        "null",
      +        "array"
      +      ]
      +    },
      +    "poll_after_ms": {
      +      "description": "Legacy spelling of poll_after_seconds in milliseconds; the two always agree. Prefer poll_after_seconds.",
      +      "type": "integer"
      +    },
      +    "poll_after_seconds": {
      +      "description": "Suggested seconds before polling again, paced to this run's recent tool-completion rate; absent for a terminal result.",
      +      "type": "integer"
      +    },
      +    "resume_run_id": {
      +      "description": "The exact auto-resume successor for an interrupted run; poll this run next.",
      +      "type": "string"
      +    },
      +    "resume_status": {
      +      "description": "Auto-resume disposition for an interrupted run: pending, resumed, failed, or unknown.",
      +      "type": "string"
      +    },
      +    "retryable": {
      +      "description": "Whether sending the same message again could plausibly succeed. False for a cause the same request would hit again, including time_limit — split the work or raise max_turn_seconds instead of retrying it unchanged.",
      +      "type": [
      +        "null",
      +        "boolean"
      +      ]
      +    },
      +    "run_id": {
      +      "description": "The public run identifier.",
      +      "type": "string"
      +    },
      +    "session_id": {
      +      "description": "The durable conversation/session identifier.",
      +      "type": "string"
      +    },
      +    "started_at": {
      +      "description": "When the run started.",
      +      "type": [
      +        "null",
      +        "string"
      +      ]
      +    },
      +    "status": {
      +      "description": "The current run status.",
      +      "type": "string"
      +    },
      +    "stop_reason": {
      +      "description": "Controller-selected stop reason, when present.",
      +      "type": "string"
      +    },
      +    "text": {
      +      "description": "The assistant's reply once the run has finished. While a run is still going this is the run's own status message, not an answer, and is often absent — read last_worklog and last_tool_step instead.",
      +      "type": "string"
      +    },
      +    "tokens": {
      +      "description": "Attributed token count; null when attribution is unavailable.",
      +      "type": [
      +        "null",
      +        "integer"
      +      ]
      +    },
      +    "tool_progress": {
      +      "additionalProperties": false,
      +      "description": "Durable tool execution progress; absent when this run has no tool-progress telemetry.",
      +      "properties": {
      +        "active_tools": {
      +          "items": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "id": {
      +                "type": "string"
      +              },
      +              "name": {
      +                "type": "string"
      +              },
      +              "started_at": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "id",
      +              "name",
      +              "started_at"
      +            ],
      +            "type": "object"
      +          },
      +          "type": [
      +            "null",
      +            "array"
      +          ]
      +        },
      +        "completed_count": {
      +          "type": "integer"
      +        },
      +        "last_completed_at": {
      +          "type": [
      +            "null",
      +            "string"
      +          ]
      +        }
      +      },
      +      "required": [
      +        "active_tools",
      +        "completed_count"
      +      ],
      +      "type": [
      +        "null",
      +        "object"
      +      ]
      +    },
      +    "upstream_status": {
      +      "description": "The model provider's HTTP status when this run died on an upstream fault; absent otherwise.",
      +      "type": "integer"
      +    },
      +    "url": {
      +      "description": "A deep link to this run's session in the plori web app.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "run_id",
      +    "session_id",
      +    "status"
      +  ],
      +  "type": "object"
      +}
  3. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

The description is exceptionally detailed: it discloses the wait hold contract, terminal vs non-terminal states, error objects, retryability, file URL auth behavior, and the input_status lifecycle. Annotations signal destructive/open-world behavior, and the description doesn't contradict them, though it doesn't elaborate on what destructive side effect might exist.

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

Conciseness5/5

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

Long but dense and well-structured: core result fields come first, then wait behavior, then state-specific outputs, then polling guidance. Every sentence carries operational value with no filler.

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

Completeness5/5

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

For a complex polling tool with an output schema, the description is complete: it covers success, failure, cancellation, awaiting input, authentication, file URLs, retryability, and polling cadence. An agent can correctly invoke and interpret results without needing additional documentation.

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?

Schema coverage is 100%, so the baseline is 3. The description adds real meaning by explaining the wait hold contract, wait_seconds bound, and how agent_id/run_id relate to invoke_agent. It also clarifies the polling semantics of wait=true and the 'cannot wake an idle client' limitation.

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 description opens with a specific verb ('Get') and enumerates exactly what is returned: status, timing, credits, tokens, worklog, tool steps, activity, and progress. It clearly focuses on a single run's result, distinguishing it from sibling tools like list_runs, invoke_agent, and cancel_run.

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?

It gives explicit polling instructions ('Keep polling a non-terminal run at poll_after_seconds') and explains when to stop polling ('cancelled' or 'expired' means never resume). It also explains wait=true vs the client-held window, and implies that answer_pending_input is the path for 'awaiting_input', though it doesn't explicitly name the alternative.

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