Skip to main content
Glama

Get job status and results

getApiJob
Read-onlyIdempotent

Poll the status of a generation job started by any tool. Every generation tool returns {id, status}; call getApiJob with that id until status is succeeded (then read result, shaped exactly like the tool's documented output) or failed (read error). Poll every few seconds, or pass wait: 30 to long-poll - the call is held up to 30 seconds (max 60) and returns as soon as the job finishes.

Input Schema

NameRequiredDescriptionDefault
idYesThe job id returned by a generation call (its `id` in the 202 response).
waitNoSeconds to long-poll for a terminal state (0-60). Defaults to 0 (return immediately).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / id / description
      Added value: +"The job id returned by a generation call (its `id` in the 202 response)."
  2. Added

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), and the description adds substantial context beyond them: the two terminal states, what field to read in each, recommended polling cadence, and the long-polling semantics of `wait` including that the call is held and returns early on completion, plus the 60s cap.

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?

Two dense sentences, front-loaded with purpose, then the full polling workflow and the long-poll option. Nothing is padding; every clause carries operational information.

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 2-param read tool with no output schema, the description supplies the return-shape story itself ('result shaped exactly like the tool's documented output', 'error' on failure) and the timing behavior. An agent has everything needed to call it correctly and interpret the response.

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 `id` and `wait` are already documented. The description still adds real meaning the schema lacks: the relationship between `id` and the generation tool's 202 response, the early-return behavior of long-polling, and the hard max of 60 for `wait`.

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?

States a specific verb+resource ('poll the status of a generation job') and scopes it to jobs 'started by any tool', which cleanly separates it from siblings like listApiJobs (enumeration) and cancelApiJob (termination). An agent can pick it without opening the schema.

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

Usage Guidelines5/5

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

Gives explicit when-to-use (call after any generation tool returns {id, status}), the loop condition (repeat until succeeded/failed), and named alternatives for the other outcomes (read `result` vs `error`). No sibling is left ambiguous.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.