Skip to main content
Glama

Wait for a subagent invocation

wait_agent
Read-onlyIdempotent

Wait for an active agent invocation to return its final result or a running snapshot while it continues executing. Poll long-running tasks without stopping them.

Instructions

Wait briefly for one invocation and return either a running snapshot or its final result.

A running response leaves the invocation active; call wait_agent again later. Use cancel_agent only when the invocation should be stopped.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
invocation_idYesInvocation ID returned by start_agent.
wait_timeout_secondsNoMaximum time to wait during this call, in seconds.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
stateYes
resultNo
snapshotNo
invocation_idYes
Behavior4/5

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

Annotations already provide readOnlyHint, idempotentHint, destructiveHint. The description adds behavioral context beyond those: returning a running snapshot means the invocation remains active and further calls to wait_agent are expected. This goes beyond simple annotation repetition.

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?

The description is compact: three sentences that front-load the core function, then provide the lifecycle note and the sibling alternative. Every sentence earns its place with no redundancy.

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?

Given there is an output schema and rich annotations, the description covers the essential lifecycle behavior (call again if running), references the sibling for cancellation, and is sufficient for correct invocation. Nothing important is missing.

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%, so the baseline is 3. The description does not add parameter-specific meaning beyond the schema—the schema already explains invocation_id and wait_timeout_seconds. The word 'briefly' loosely hints at timeout but adds little.

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?

The description clearly states the specific action ('Wait briefly for one invocation') and the two possible outcomes ('running snapshot or its final result'). It differentiates from siblings by explicitly addressing the running case and referencing cancel_agent as the stopping mechanism.

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?

Explicit usage guidance is given: 'A running response leaves the invocation active; call wait_agent again later. Use cancel_agent only when the invocation should be stopped.' This tells the agent exactly when to reuse this tool and when to switch to a sibling.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/TimWongUp/agentnave'

If you have feedback or need assistance with the MCP directory API, please join our Discord server