Skip to main content
Glama

wait_for_job

Poll a background job until completion or failure, with a configurable timeout and polling interval to control how long the client waits.

Instructions

Poll a background job until completion or failure with configurable timeout.

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": {
      "job_id": "<job_id>"
    },
    "name": "wait_for_job"
  }
}

Input Schema

NameRequiredDescriptionDefault
job_idYesActiveJob UUID to wait for
timeout_msNoMaximum wait timeout in milliseconds (default: 60000)
poll_interval_msNoPolling interval in milliseconds (default: 2000)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden and does disclose the core blocking/polling loop and that failure terminates the wait. It does not say what happens when the timeout elapses (error, partial result, or last-known status), nor whether the call blocks the caller for the whole interval, which matters for a long-polling tool.

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?

A single front-loaded sentence with no filler; the terminating condition and configurable timeout both appear before any implementation detail. Nothing is wasted or buried.

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

Completeness3/5

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

For a 3-parameter tool with no annotations and no output schema, the definition covers the essential mechanics but omits the return shape on success versus timeout expiry. An agent can call it, but cannot fully predict the result of an expired wait.

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 description coverage is 100%, so the schema already defines job_id, timeout_ms and poll_interval_ms with defaults and bounds; baseline would be 3. The description adds the conceptual framing that the timeout governs how long the poll runs, giving slight meaning beyond field-level docs.

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?

Description uses a specific verb (poll/wait) and resource (background job) and states the terminating condition (completion or failure) plus configurability of the timeout. It implicitly contrasts with the one-shot nature of get_job_status, but never names that sibling, so differentiation is left to inference.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: 'until completion or failure' signals a blocking wait, which an agent can read as the alternative to a single status check. There is no explicit when-to-use/when-not guidance and no named alternative tool.

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