Skip to main content
Glama

Wait for job

wait_for_job
Read-only

Wait for a job to finish, polling for up to timeout_s seconds (max 600). Returns the final status, or the latest status with a note if it is still running; call again to keep waiting. job_id is the request_id returned by generate.

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_idYes
timeout_sNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Beyond readOnlyHint/openWorldHint, the description discloses the blocking/polling nature, the 600s ceiling, and the shape of the outcome ('final status, or the latest status with a note if it is still running'), which is exactly the ambiguity an agent would otherwise hit. It does not cover error cases such as an unknown or cancelled job, so not a 5.

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 sentences and a parenthetical, front-loaded with the action and bound, with no filler; the retry instruction follows immediately.

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?

An output schema exists, so return values needn't be detailed, and the description already summarizes the two possible outcome shapes. The remaining gap is failure/cancellation handling and what happens if the job never appears, minor for a polling helper.

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 0%, so the description must compensate, and it does for both parameters: job_id is tied to generate's request_id and timeout_s gets a hard max of 600 (the default of 300 lives in the schema). It leaves the unit/behavior of timeout_s only partially spelled out beyond the seconds implied by the name.

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 (wait), resource (job), and the mechanism and bound ('polling for up to timeout_s seconds (max 600)'), which distinguishes it from a plain one-shot status fetch like get_job without needing to name it.

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 explicit continuation guidance ('call again to keep waiting') and tells the agent where job_id comes from ('the `request_id` returned by generate'), which routes correctly to the producing tool. It stops short of an explicit exclusion such as 'use get_job for a non-blocking snapshot', so a 4 rather than 5.

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.

Resources