Skip to main content
Glama

pi_wait

Block until a pi task run completes or needs a response, returning final state, summary, and pending request.

Instructions

Block until the pi task's current run finishes (state idle/aborted/error), a UI dialog needs answering, or timeoutMs elapses. Returns the final state, the last assistant text in 'summary', and 'pendingRequest' when pi is waiting for pi_respond.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskIdYes
timeoutMsNoDefault 600000 (10 minutes)
Behavior4/5

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

With no annotations, the description carries the transparency burden. It details the blocking behavior, exit conditions, and return fields. It stops short of noting side effects or auth requirements, but the wait-and-return semantics are clearly disclosed.

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 front-load the purpose and then list return values. No wasted words.

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?

The description explains return values despite no output schema, and covers the main blocking behavior and the special pendingRequest condition. It doesn't address error cases, but for the tool's apparent simplicity, this is sufficiently complete.

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?

The schema covers only timeoutMs with a description; taskId lacks meaning. The description references 'timeoutMs elapses' and 'pi task' behaviorally, but doesn't elaborate on parameter formats or constraints. For 2 parameters with 50% coverage, this is adequate but not enriching.

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 opens with 'Block until the pi task's current run finishes' – a specific verb+resource that clearly identifies the tool's function. It distinguishes it from siblings like pi_status by emphasizing blocking behavior and return of final state, summary, and pendingRequest.

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?

The description gives clear context: it blocks until a run finishes, a dialog needs answering, or timeoutMs elapses. It doesn't explicitly name alternatives, so it's not a 5, but the conditions imply when to use it, especially the note about waiting for pi_respond.

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/turbin/pi-subagent-mcp'

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