Skip to main content
Glama

Wait for a task

wait_for_task
Read-only

Blocks until a delegated test-writing task finishes or times out, then returns its status and latest steps; call it again while the task is still running.

Instructions

Blocks until the task finishes or timeoutSeconds passes, then returns its status and recent: the latest steps (files the agent wrote, commands it ran, what it said). Call again while it is still running.

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": "wait_for_task"
  }
}

Input Schema

NameRequiredDescriptionDefault
taskIdYes
timeoutSecondsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.1

TDQS

A4.4/5.0
Behavior4/5

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

Discloses the key behavior annotations can't: the call blocks until completion or the timeout elapses, and then returns status plus recent activity. That is consistent with readOnlyHint=true. It omits details like the 600s ceiling on blocking time and whether a timeout result differs from a completion result.

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 sentences, no waste. The blocking semantics and return contents come first, followed by the retry instruction — exactly the front-loading an agent needs.

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 return-value burden and does so by naming the status and `recent` contents. Combined with the retry guidance, an agent can call this correctly. Only the timeout edge case (what a timed-out return looks like vs. a completed one) is left 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?

Schema coverage is 0%, so the description must compensate; it explains that timeoutSeconds bounds the blocking wait, which is the parameter whose meaning matters most. taskId's role is left implicit (though obvious from context), and the default/limits are only in the schema.

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 (blocks/waits), resource (task), and the exact return payload (status plus `recent` steps). The blocking-vs-polling framing lets an agent distinguish it from siblings like get_task_status and get_task_result without opening their schemas.

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 an explicit usage loop — 'Call again while it is still running' — which tells the agent exactly how to keep waiting after the timeout fires. It does not explicitly contrast with get_task_status/get_task_result or say when non-blocking polling is preferable, so it stops short of 5.

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