Skip to main content
Glama

Wait for background work

wait_for_jobs
Read-onlyIdempotent

Blocks until queued or running background work finishes, fails, stops, or times out, reporting progress and signaling when to read results; scope by job or project.

Instructions

Block until background work changes state: returns as soon as a job finishes (done / failed / stopped), or when nothing is queued or running, or after timeoutSeconds (max 50). With jobId, waits for that job only; with projectId, for that project's jobs. Call it repeatedly after any tool that queued work until idle is true, then read the results. Reports progress of jobs still running.

Input Schema

NameRequiredDescriptionDefault
jobIdNoWait for this job only.
projectIdNoOnly this project's jobs (a finished fetch can start brainstorming, then a check).
timeoutSecondsNoMax seconds to wait (default 45, max 50).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.7

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive), and the description adds real behavior the annotations cannot: it blocks, it has a hard timeout cap of 50s, and it surfaces progress of still-running jobs. It does not describe what a timeout expiry looks like versus a genuine completion, which would have made it 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.

Conciseness4/5

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

Four tight sentences with the core blocking behavior front-loaded and no filler. The first sentence is clause-heavy but every clause carries a return condition an agent needs, so it earns its length.

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 carries the burden of explaining returns, and it does partially: it names the terminal states, the idle flag, and progress reporting. It never specifies the actual response shape (per-job records vs. aggregate), which leaves a real gap for a polling tool an agent must loop on.

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 coverage is 100%, so all three parameters are already documented with descriptions, defaults, and bounds. The description restates the jobId/projectId scoping and the 50s cap rather than adding new meaning (e.g. how the two filters interact when both are supplied). Baseline 3 is appropriate.

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 and resource ("Block until background work changes state") plus the exact conditions under which it returns (done/failed/stopped, nothing queued or running, or timeout). This is clearly distinguishable from siblings like stop_job, clear_jobs, and get_ai_status without opening any schema.

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?

"Call it repeatedly after any tool that queued work until idle is true, then read the results" gives an explicit when-to-use rule and even the polling loop shape. It does not name an alternative or state a when-not condition (e.g. use stop_job to cancel instead of waiting), so it stops short of a 5.

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