Skip to main content
Glama

pi_spawn_agent

Start a named Pi agent asynchronously to delegate a task and keep working; use the returned ID to check progress or retrieve final results later.

Instructions

Start a named Pi agent asynchronously. Returns identity/status, not a completed result. Continue independent work; when idle, call pi_wait_agent instead of repeatedly polling. pi_poll_agent reads progress or a needs_input question; answer through pi_continue_agent on the same ID. Read final delivery with pi_get_result once done. Unread events may accompany any tool response; no live notifications. Use pi_list_agents for reuse. Omit model to follow Pi settings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoAbsolute task/project working directory. Pass it explicitly when the MCP client starts servers outside the project.
nameNoOptional human-readable agent name; generated when omitted.
taskYesTask description for the Pi agent
modelNoOptional model key in "provider/model-id" format (e.g. anthropic/claude-sonnet-4-6, openai/gpt-4o). Omit to use the model resolved from the user's current Pi settings default (read per task, so a settings change applies to the next spawn). Pass an explicit model to override it.
descriptionNoOptional short description to help identify and reuse this agent.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does so well: asynchronous execution, that the response is identity/status rather than a result, that there are no live notifications, that unread events may ride along with any tool response, and how model defaulting behaves. It does not discuss permissions, concurrency limits, or cost, so it falls short of a 5.

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?

Front-loaded with the core action and return semantics, then lifecycle routing. It is dense and largely earn-your-place, though the telegraphic style (semicolon-joined fragments) makes it slightly harder to parse than it needs to be.

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?

No output schema and no annotations, so the description must explain return shape and follow-up path — it does both. Given the 11-tool sibling set and 5-param schema, the definition gives an agent enough to spawn and drive an agent to completion; only auth/limits context is absent.

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 schema already documents all five parameters including cwd, name, model format, and description. The one added line ('Omit model to follow Pi settings') restates what the model param description already says, so there is no real value beyond the schema. Baseline 3 applies.

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 ('Start a named Pi agent asynchronously') and immediately bounds the outcome ('Returns identity/status, not a completed result'), which is exactly the ambiguity an agent faces with a spawn tool. It also implicitly separates itself from pi_followup_agent/pi_list_agents by directing reuse to pi_list_agents.

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 when-to-use and when-not: continue independent work, call pi_wait_agent when idle rather than repeatedly polling, use pi_poll_agent for progress or needs_input, answer via pi_continue_agent, read final delivery with pi_get_result, and use pi_list_agents for reuse. Every sibling in the lifecycle is routed by condition.

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