Skip to main content
Glama

Wait for a job (bounded polling)

wait_for_job
Read-only

Polls a CraftStory job's status until it reaches a terminal state, returning early when done; call again if it is still running.

Instructions

Polls a job's status every few seconds for up to timeout_s (default 45, max 55 - most MCP clients cut a tool call at 60 s) and returns as soon as it is terminal. If it returns state='running', call it again - craftstory-2 jobs take 8-15 minutes, minimax-h3 1-3 minutes, audio clips seconds. Reports progress notifications when the client supports them.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
modelYes
timeout_sNoHow long this call may wait (default 45, max 55)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint; the description adds real behavioral detail beyond them, including the polling cadence, the early-return-on-terminal semantics, the default/max timeout, the reason for the 55 s cap (clients cut calls at 60 s), progress-notification support, and typical run durations. This is exactly the kind of context an agent needs to avoid misusing a long-running poll.

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?

Three dense sentences, front-loaded with the polling behavior and return condition, then the re-invocation rule and the duration table. Every clause carries operational information; nothing is filler.

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?

With no output schema and only partial parameter documentation, the description carries the return-contract burden and does it well by describing the 'running' vs terminal outcome and progress notifications. It stops short of naming the terminal states or explaining what the agent should do with a terminal result, which would fully close the loop.

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 only 33%, so the description must compensate, and it does: it explains timeout_s's default and max and the client-cutoff rationale behind them, and it attaches expected durations to each model enum value, giving the enum practical meaning. The required id parameter still has no description anywhere (only format=uuid), which keeps this below a 5.

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

Purpose4/5

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

States a specific verb and resource: polls a job's status and returns as soon as it reaches a terminal state, with the bounded-timeout behavior named up front. It implicitly separates itself from the one-shot get_job_status by describing the re-invocation loop, but it never names that sibling explicitly, so an agent must infer the distinction.

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?

Gives concrete when-to-call guidance: re-invoke whenever the result is state='running', and it supplies per-model duration expectations (craftstory-2 8-15 min, minimax-h3 1-3 min, audio clips seconds) so the agent can budget calls. It does not explicitly contrast this with get_job_status or state when polling is unnecessary, so the alternative selection is left partly to inference.

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