Skip to main content
Glama

wait_for_job

Read-onlyIdempotent

Polls a job until it reaches a terminal status—succeeded, failed, or cancelled—then returns the result; optionally stop after a timeout and return the last known state.

Instructions

Wait for a job to reach a terminal status (succeeded, failed, or cancelled) using API long polling, then return it.

Input Schema

NameRequiredDescriptionDefault
job_idYesThe job ID to wait on.
timeout_secondsNoGive up after this many seconds and return the last known job state. Defaults to 300, max 1800.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover readOnly/idempotent/non-destructive, and the description adds the genuinely useful behavioral fact that this is a blocking long-poll call that returns only on terminal status. It omits what happens on timeout (only stated in the schema) and any note about connection duration or rate limits.

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 sentence, front-loaded with the blocking purpose and ending with the terminal-state enumeration. Every clause carries information; nothing is redundant.

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 two-parameter blocking read with full schema coverage and safety annotations, the description is nearly complete. The one gap is that with no output schema, it says only 'return it' without indicating the shape of the returned job object or the timeout-state payload.

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

Parameters3/5

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

Schema description coverage is 100%, with both job_id and timeout_seconds fully documented including the 300 default and 1800 max. The description adds no parameter-level meaning beyond that, so the baseline 3 applies.

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?

The description gives a specific verb ('wait'), a specific resource (a job), and enumerates the terminal statuses it resolves on, so its blocking semantics are distinguishable from get_job's immediate read. It stops short of naming get_job or list_jobs explicitly as the non-blocking alternatives.

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 only implied: an agent can infer 'use this when you need to block until completion,' but the description never says when to prefer this over get_job polling or list_jobs. No exclusions, prerequisites, or alternatives are stated.

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