Skip to main content
Glama

Job Wait

job_wait
Read-onlyIdempotent

Blocks until a background job finishes and returns its final state and result; if the timeout expires, returns the job as still running so you can call again.

Instructions

Block until a job finishes, then return its final state and result.

If timeout_s elapses first, returns it still running: call again to keep waiting.

Input Schema

NameRequiredDescriptionDefault
job_idYesId from a write that returned status='started' (or job_list).
timeout_sNoSeconds to wait.

Output Schema

NameRequiredDescriptionDefault
idYes
kindYes
errorNo
labelYes
stateYes
resultNo
progressNo
started_atYes
finished_atNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.0.4
    • addedInput schema / properties / job_id / description
      Added value: +"Id from a write that returned status='started' (or job_list)."
    • addedInput schema / properties / timeout_s / description
      Added value: +"Seconds to wait."
  2. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

The description adds meaningful behavior beyond the annotations: the call blocks, returns final state and result on completion, and returns a still-running state if timeout_s elapses. This is important operational context. It does not cover failure cases or cancellation behavior, but the annotations already establish the safe read-only profile.

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 tightly written sentences, front-loaded with the core blocking behavior and followed by the timeout fallback. No sentence is 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?

Given the output schema and annotations, the description covers the essential call behavior: blocking, timeout handling, and repeat invocation. It could say more about failure or cancellation outcomes, but the core semantics an agent needs are present.

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 the schema already documents job_id and timeout_s. The description adds useful timeout-outcome semantics ('returns it still running'), but it does not add further meaning to job_id beyond the schema's origin note.

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 states a specific verb and resource: 'Block until a job finishes' and return its final state and result. It distinguishes the blocking wait behavior from ordinary status checks implicitly, but does not explicitly name the sibling alternative job_status.

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

Usage Guidelines3/5

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

It explains the timeout loop ('call again to keep waiting'), which implies how to use the tool across multiple calls. However, it does not explicitly say when to use job_wait instead of job_status, job_list, or job_cancel, so the alternative-selection guidance remains implied.

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