Skip to main content
Glama

Wait for Job

wait_job
Read-onlyIdempotent

Wait for a long-running job and return the resolved result — a bounded long-poll. Includes template preparation (kind="template", id=jobId), media import, render, compose, consult, suggestions and preview. If still running, call wait_job again with the same arguments; work continues server-side.

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": {
      "kind": "<kind>",
      "id": "<id>"
    },
    "name": "wait_job"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYeskind="media": mediaItemId returned by import/generate/finalize/import_resource. kind="render": renderId. kind="compose": composeJobId. kind="consult": consultJobId. kind="suggestions": mediaItemId. Generic kinds use the jobId from the enqueue receipt.
kindYesWhat to wait on, including template preparation (kind="template").
projectIdNoRequired when kind="render", "compose", or "consult".
timeoutMsNoMaximum wait in ms (default 30 min for render/compose, 5 min for suggestions).
imageIndicesNoRead these 1–4 original zero-based image artifact indices from this completed job, in this order. Does not render again. Same arguments repeat the same selection; omit for the first four.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changed
    • addedInput schema / $defs
      Added value: +{
      +  "__schema0": {
      +    "items": {
      +      "$ref": "#/$defs/__schema1"
      +    },
      +    "maxItems": 4,
      +    "minItems": 1,
      +    "type": "array"
      +  },
      +  "__schema1": {
      +    "maximum": 9007199254740991,
      +    "minimum": 0,
      +    "type": "integer"
      +  },
      +  "__schema2": {
      +    "type": "string"
      +  },
      +  "__schema3": {
      +    "maximum": 1800000,
      +    "minimum": 1000,
      +    "type": "integer"
      +  }
      +}
    • addedInput schema / properties / imageIndices
      Added value: +{
      +  "$ref": "#/$defs/__schema0",
      +  "description": "Read these 1–4 original zero-based image artifact indices from this completed job, in this order. Does not render again. Same arguments repeat the same selection; omit for the first four."
      +}
    • addedInput schema / properties / projectId / $ref
      Added value: +"#/$defs/__schema2"
    • removedInput schema / properties / projectId / type
      Removed value: -"string"
    • addedInput schema / properties / timeoutMs / $ref
      Added value: +"#/$defs/__schema3"
    • removedInput schema / properties / timeoutMs / maximum
      Removed value: -1800000
    • removedInput schema / properties / timeoutMs / minimum
      Removed value: -1000
    • removedInput schema / properties / timeoutMs / type
      Removed value: -"integer"
  2. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, so the safety profile is covered. The description adds genuinely new behavior: it's a bounded long-poll, the server keeps working between calls, and re-invoking with identical arguments is the correct continuation pattern. It doesn't say what is returned on timeout, which is the remaining gap.

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 action and its bounded-poll nature in the first clause, then the retry rule. The enumeration of supported kinds (media import, render, compose, consult, suggestions, preview) is largely duplicated by the schema enum and is the one bit of low-value bulk.

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?

No output schema exists, so the description must carry return semantics, and 'return the resolved result' is thin but the polling contract compensates. For a read-only poll tool with full schema coverage and a clear retry rule, an agent has enough to call it correctly; only the timeout/no-result outcome is unaddressed.

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%, so every parameter including the kind enum, projectId conditional requirement, timeoutMs defaults, and imageIndices repeat semantics is already documented in the schema. The description only reinforces the kind="template"/id=jobId pairing, adding little beyond structured data. 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 opens with a concrete verb+resource ('Wait for a long-running job') and adds a precise operational characterization ('a bounded long-poll'), which an agent can act on directly. It doesn't explicitly contrast with siblings like get_render or get_composition, which is the only thing keeping it from a 5.

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?

It gives the key operational rule: if the job is still running, call wait_job again with the same arguments because work continues server-side. That covers the dominant usage pattern well. It stops short of saying when to prefer this over a fetch-result sibling such as get_render, so there's no explicit exclusion.

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.