Skip to main content
Glama

wait_for_job

Read-only

Waits for an AutoDL background job to finish, encounter a capacity shortage, or time out, then returns a status snapshot. Use it to check job progress without cancelling startup.

Instructions

只读等待当前进程任务结束、缺货或超时后返回快照;默认缺货立即返回。timeout_seconds 为 0–300 秒(默认 15,0 立即返回)。return_on_capacity=False 可等待穿过缺货阶段;活动 phase 表示尚未结束。缺货返回后先汇报 attempts/elapsed_seconds/next_retry_in_seconds,不要紧密重复查询。next_retry_in_seconds 为快照时距下次重试的剩余秒数(向上取整,无重试时为 null)。本次等待超时或断开不会取消后台开机任务;任务不跨服务重启恢复。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
job_idYes
timeout_secondsNo
return_on_capacityNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior5/5

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

Goes well beyond the readOnly/destructive annotations: a timeout or disconnect does not cancel the background power-on job, jobs do not survive service restarts, the capacity-shortage phase can be waited through, and 'active phase' means not finished. These are exactly the lifecycle/auth-adjacent caveats an agent needs and that 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?

Dense but front-loaded: the purpose leads, followed by parameter semantics, retry-reporting guidance, and lifecycle caveats, each sentence carrying distinct information. Slightly passive-clause heavy but no filler.

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?

For a wait/polling tool with an output schema, it covers the important non-return-value facts: capacity-phase behavior, retry snapshot semantics, non-cancellation, and restart non-persistence. Adequate; only the meaning of job_id relative to the instance lifecycle is unstated.

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?

With 0% schema description coverage, the description compensates well: timeout_seconds range (0–300), default (15), and the 0-means-immediate case, plus return_on_capacity=False semantics and next_retry_in_seconds rounding/null behavior. Only job_id is left unexplained.

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 opening states a specific verb and resource: read-only wait on the current job until it ends, hits a capacity shortage, or times out, returning a snapshot. This distinguishes it from immediate-return siblings like job_status, though it never names an alternative explicitly.

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 gives usage behavior (report attempts/elapsed_seconds/next_retry_in_seconds after a shortage return; don't tightly repeat queries) and explains return_on_capacity, but offers no explicit when-to-use-this-vs-job_status/power_on routing for the agent.

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