Skip to main content
Glama

wait_agents

Waits for specified background agent jobs to finish, or any job when none are given, and returns each job ID and final status. Returns timedOut=true at the timeout deadline.

Instructions

指定ジョブ(省略時は任意のジョブ)が終了するまで待つ。timeout_msは最小値未満を最小値へ補正し、最大値超過は拒否する。期限到達時はtimedOut=trueで戻る。終了通知(jobId/状態のみ)を返す

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "wait_agents"
  }
}

Input Schema

NameRequiredDescriptionDefault
job_idsNo
timeout_msNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations present the description carries the full burden, and it does disclose real behavior beyond the name: timeout_ms values below the minimum are silently clamped upward, values above the maximum are rejected, expiry returns with timedOut=true, and the payload contains only jobId/status (not logs or output). The one substantive omission is whether an array of job_ids blocks until all complete or until the first completes.

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 short, front-loaded clauses, each carrying distinct information with no filler. The ordering is sensible (purpose, then parameter behavior, then timeout and return shape). Slightly telegraphic in places, but nothing is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-required-parameter blocking tool with no annotations and no output schema, the description does cover the essential return shape and timeout semantics. It leaves material gaps: the semantics of waiting on multiple job_ids (all vs. first), the actual timeout bounds, and any error/not-found behavior for unknown job IDs.

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 0%, two parameters exist, and the description supplies meaning for both: job_ids is optional and means 'any job' when omitted, timeout_ms is normalized/rejected per bounds. However it never states what the minimum or maximum actually is (the schema maximum of 9007199254740991 is a numeric cap, not the intended wait limit), nor explains the maxItems=20 limit. Partial compensation only.

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 first clause names a specific verb and resource: block until a designated job (or any job when omitted) finishes. That is unambiguous. It does not, however, contrast itself with polling-style siblings such as get_run/get_agent or explain how it relates to cancel_agent, so sibling differentiation is left to the agent.

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?

Useful context is implied: pass job_ids to target specific jobs, omit them to wait on any job. But there is no explicit guidance on when to prefer this over get_run polling or how to combine it with run_agent, and no stated prerequisites (e.g. that job_ids must refer to currently running jobs).

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