Skip to main content
Glama

wait_for_task

Read-only

Read-only long-poll background agent work until it settles; returns early on terminal states, failures, or genuine user-input decisions so you can continue or hand off.

Instructions

Wait for background Agent work to settle. If timed_out or must_continue_in_this_turn is true, do not end the chat turn: wait again or perform the returned PM/ChatGPT handoff. Returns early for terminal states, failures, and decisions that genuinely require user input. If the result has a non-null action_required, do NOT end your turn: perform it immediately (usually wait_for_task again). If it has a non-null meeting_mode_notice, your reply to the user MUST begin with meeting_mode_notice.text verbatim as its first line. Read-only long poll. Use get_task_status for an instant snapshot instead.

Input Schema

NameRequiredDescriptionDefault
task_idNoTask id. Omit it to use the project's current workstream task, which is what you want almost always; pass it only to look up a historical task.
project_idYesRegistered project id, as returned by list_projects.
timeout_secondsNoLongest time to wait before returning, in seconds, from 0 to 3600. Default 50; returns earlier when the work settles.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.1.3
    • addedInput schema / properties / project_id / description
      Added value: +"Registered project id, as returned by list_projects."
    • addedInput schema / properties / task_id / description
      Added value: +"Task id. Omit it to use the project's current workstream task, which is what you want almost always; pass it only to look up a historical task."
    • addedInput schema / properties / timeout_seconds / description
      Added value: +"Longest time to wait before returning, in seconds, from 0 to 3600. Default 50; returns earlier when the work settles."
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only cover read-only/non-destructive safety, but the description adds the blocking/long-poll behavior, the early-return conditions (terminal states, failures, decisions requiring user input), and required post-call protocol for action_required and meeting_mode_notice. That is substantial behavioral context beyond what the structured fields declare.

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?

The purpose and the get_task_status alternative are front-loaded, and every block carries operational meaning. Minor waste from overlapping instructions about not ending the turn (timed_out/must_continue_in_this_turn vs. action_required) and from ragged indentation that makes the text look longer than it is.

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

Completeness5/5

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

An output schema exists, so return-value documentation is unnecessary; the description instead names the specific result fields that drive downstream behavior (action_required, meeting_mode_notice, timed_out). For a blocking poll tool this is complete enough to invoke and act on correctly.

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 100% and the schema itself explains omitting task_id to use the current workstream task and the timeout range. The description adds no additional parameter guidance, so the baseline 3 for fully documented schemas 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 ("wait for background Agent work to settle") and immediately frames the mechanism as a "Read-only long poll." It also explicitly contrasts itself with get_task_status for an instant snapshot, so an agent can distinguish it from siblings without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit when-to-use alternative ("Use get_task_status for an instant snapshot instead") and a concrete when-not-to-stop rule: if timed_out or must_continue_in_this_turn is true, do not end the turn. It also states which outcomes cause an early return, so the agent knows what conditions end the wait.

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