Skip to main content
Glama

Poll an Async Job

result
Read-onlyIdempotent

Fetch the status + output of an async job started by use (e.g. a video render). Pass the job_id that use returned with { async: true }. Returns { status, result?, progress?, charged_cents }: running (still working — when the job reports it, progress carries { phase, percent, rendered_frames, total_frames, eta_sec } and hint is a one-line summary like "rendering 42% (380/900 frames, ~120s left)", so you can tell real progress from a hang; wait a bit and call again), succeeded (result holds the output, e.g. the video URL; the call is charged now), or failed/cancelled (no charge; on failed, read error AND hint — hint carries the service's usage notes, which usually explain how to fix the call). Safe to call repeatedly — it never starts new work or double-charges. ALWAYS use this to retrieve an async result instead of re-running use (re-running starts a new paid job).

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": "result"
  }
}

Input Schema

NameRequiredDescriptionDefault
job_idYesThe job_id returned by an async `use` call.

Output Schema

NameRequiredDescriptionDefault
okNoTrue when the call succeeded.
hintNoHuman-readable progress summary.
errorNoError code/message when ok=false.
job_idNoThe polled job id.
resultNoFinal output when succeeded.
statusNoJob state.
progressNoProgress detail (e.g. percent) while running.
charged_centsNoAmount billed for this call, in cents.
balance_remaining_centsNoWallet balance remaining, in cents.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "balance_remaining_cents": {
      +      "description": "Wallet balance remaining, in cents.",
      +      "type": "number"
      +    },
      +    "charged_cents": {
      +      "description": "Amount billed for this call, in cents.",
      +      "type": "number"
      +    },
      +    "error": {
      +      "description": "Error code/message when ok=false.",
      +      "type": "string"
      +    },
      +    "hint": {
      +      "description": "Human-readable progress summary.",
      +      "type": "string"
      +    },
      +    "job_id": {
      +      "description": "The polled job id.",
      +      "type": "string"
      +    },
      +    "ok": {
      +      "description": "True when the call succeeded.",
      +      "type": "boolean"
      +    },
      +    "progress": {
      +      "description": "Progress detail (e.g. percent) while running.",
      +      "type": "object"
      +    },
      +    "result": {
      +      "description": "Final output when succeeded."
      +    },
      +    "status": {
      +      "description": "Job state.",
      +      "enum": [
      +        "running",
      +        "succeeded",
      +        "failed",
      +        "cancelled"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

The description adds substantial behavioral context beyond annotations: it's safe to call repeatedly, does not double-charge, charging happens only on success, and failed/cancelled jobs do not incur charges. It also explains the meaning of `progress` and `hint`, which is not present in the annotations.

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?

The description is long but every sentence carries value and the key action is front-loaded. It could be slightly more compact, but the density of useful behavioral and status details justifies the length.

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?

Given a single parameter and a rich state machine, the description fully covers the polling workflow: statuses, progress fields, hints, charging semantics, and the alternative to avoid. It leaves no obvious gap for an agent to misuse the tool.

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 already documents `job_id` as returned by an async `use` call, so baseline is 3. The description adds the specific instruction to pass the `job_id` returned when `use` was called with `{ async: true }`, reinforcing the origin and exact usage of the parameter.

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?

Clearly states it fetches status and output of an async job started by `use`. Distinguishes itself from siblings by explicitly naming `use` as the origin of the job and positioning `result` as the polling counterpart.

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?

Provides explicit guidance on when to use this tool instead of re-running `use`, noting that re-running starts a new paid job. Also explains when to call again based on job status, making usage conditions unambiguous.

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.