Skip to main content
Glama

Wait for a ZCode task

zcode_wait
Read-only

Blocks until a subagent task finishes or timeout elapses, then returns its status and result text; if still running, call again instead of tight polling.

Instructions

Block until the task finishes or timeoutSec elapses (default 45, max 55 so it stays under typical 60s tool-call timeouts), then return its status; when finished the result text is included. If it returns status 'running', just call zcode_wait again. Prefer this over tight polling.

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": {
      "taskId": "<taskId>"
    },
    "name": "zcode_wait"
  }
}

Input Schema

NameRequiredDescriptionDefault
taskIdYes
timeoutSecNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.1/5.0
Behavior5/5

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

Goes well beyond the readOnlyHint/openWorldHint annotations by disclosing blocking semantics, the 45s default, the 55s cap, and the rationale for that cap (staying under typical 60s tool-call timeouts). It also explains the polling loop contract and that result text appears only once finished. This is exactly the operational context an annotation cannot carry.

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?

Three tight sentences with the blocking behavior and timing constraints front-loaded, followed by the retry contract. The parenthetical rationale earns its space by explaining the 55s cap, and nothing is 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 two-parameter polling tool with no output schema, this covers timing, blocking behavior, return contents, and the retry loop adequately. Minor gaps remain around error cases (invalid taskId, task not found) and what status values other than 'running' look like.

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%, so the description must carry parameter meaning. It fully explains timeoutSec: default 45, max 55, and why. However, taskId is only referenced obliquely as 'the task', with no explanation of the sess_/session_ identifier format enforced by the schema pattern.

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?

States a specific verb and resource: blocks until the ZCode task finishes, then returns its status. The scope of the return value (status, plus result text when finished) is spelled out. It does not explicitly contrast with siblings such as zcode_status or zcode_progress, which would be needed for a 5.

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?

Gives concrete operating guidance: if status is 'running', call zcode_wait again, and prefer this over tight polling. That tells the agent how to use the tool in the loop. It stops short of naming non-blocking alternatives like zcode_status for cases where blocking is inappropriate.

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