Skip to main content
Glama

Wait for job

wait_for_job
Read-onlyIdempotent

Free. Wait for a job from a paid tool: returns as soon as it finishes (or, with until "changed", as soon as its status changes), else after wait_seconds (default 45, at most 50). Call it again while finished is false. A finished job comes with its result and studio_url; show the user the first line (tokens and credits) and the studio_url. Sends progress notifications while it waits when the client asks for them.

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
untilNo
job_idYes
wait_secondsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior5/5

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

Goes well beyond the annotations (read-only, idempotent, non-destructive) by disclosing cost ('Free'), timing behavior (default 45s wait, capped at 50), the status-change mode, the retry condition, the shape of a finished result (result plus studio_url), and that progress notifications are sent only when the client requests them. That is exactly the extra behavioral context annotations cannot convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core behavior and priced-in details packed efficiently into a few sentences; every clause carries information. Density in the first sentence (nested parenthetical for the 'changed' mode) costs some readability but nothing is truly wasted.

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, the description correctly explains what a finished job returns (result and studio_url) and how to keep polling. It stops short of covering failure/cancel outcomes, timeout results, or where job_id originates, which matter for an agent handling a job that never finishes.

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 0%, so the description must carry parameter meaning: it explains the 'until "changed"' mode versus the default finished behavior and states wait_seconds' default of 45 and maximum of 50. The job_id parameter is only implied ('a job from a paid tool') and its format/optionality are left to the schema's pattern constraint.

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 ('Wait for a job') plus the exact return condition (returns as soon as it finishes, or on status change with until "changed", else after wait_seconds). This makes the blocking/waiting nature clear relative to siblings like get_job_status, but no sibling is named to make the distinction explicit.

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 operational guidance: 'Call it again while finished is false' defines the polling loop, and the follow-up instruction to show the user the first line and studio_url sets an expected workflow. It does not, however, say when to prefer this over get_job_status or get_job_result, nor when not to use it.

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