Skip to main content
Glama
ebrindley
by ebrindley

Cursor: wait for run

cursor_wait_run
Read-onlyIdempotent

Poll a Cursor agent run until it reaches a terminal state or waitMs elapses, then return the run status plus a timedOut flag for deciding whether to keep waiting.

Instructions

Poll one run until it is terminal or waitMs elapses (default 30s, maximum 45s). Returns what cursor_get_run returns plus timedOut; call again to keep waiting.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
runIdYesRun id, in `run-<uuid>` form.
waitMsNoUpper bound on the wait. Kept under the client's request timeout on purpose.
agentIdYesAgent id, in `bc-<uuid>` form.
pollIntervalMsNoDelay between polls. Default 5000.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
pollsYes
statusYes
branchesYes
terminalYes
timedOutYes
elapsedMsYes
durationMsNo
resultBytesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already indicate readOnlyHint=true and destructiveHint=false, covering the safety profile. The description adds valuable behavioral context: it polls, enforces a wait bound, and returns a timedOut flag. It also discloses that it can be called repeatedly to continue waiting. No contradiction is present.

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?

The description is two sentences, front-loaded with the core purpose and termination condition. Every word adds value: it states the action, the timeout default/max, the return behavior, and the re-call guidance. No filler or repetition.

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?

The tool has an output schema (not shown) so return values are already documented. The description focuses on the polling semantics, which is the tool's unique aspect. It covers the primary use case, timeout handling, and re-polling. Minor gaps like error behavior for non-existent runs are not covered but are likely handled by the runId validation and output schema. Overall, it is complete for an agent to call correctly.

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 each parameter is already described. The tool description adds the default for waitMs (30s) and clarifies that waitMs is an upper bound on the wait. It also explains how waitMs relates to polling behavior. This supplements the schema meaningfully without redundancy.

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 clearly states a specific action ('Poll one run') and a specific resource, with a precise termination condition ('until it is terminal or waitMs elapses'). It also explicitly differentiates from the sibling cursor_get_run by noting it returns the same data plus a timedOut field, making the distinction obvious.

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 description gives clear context: it is used to wait for a run to reach a terminal state, and tells the agent to call again to keep waiting if the timeout expires. It does not explicitly say when NOT to use it or name the alternative cursor_get_run, but the mention of returning its result plus timedOut implies that get_run is the non-polling alternative. This is sufficient for an agent to choose correctly.

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