Skip to main content
Glama

spawn

Delegate tasks that take over a minute to a background pi agent, receive a session ID immediately, then poll status, redirect, or answer its questions.

Instructions

Delegate a task to a pi agent running in the background. Returns a sessionId immediately, so nothing blocks. Poll with status, redirect with steer, answer its questions with answer. Use this for anything that might take more than a minute.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoYour own session id for traceability, e.g. "search-audit-01". 1-64 chars of [A-Za-z0-9._:-], must start alphanumeric, must not already be in use. Defaults to a UUID.
cwdNoWorking directory for the agent
labelNoFree-text note shown in `sessions`, e.g. what this delegate is for
modelNoModel as "provider/modelId", e.g. "openrouter/stealth/ox-alpha"
toolsNoTool allowlist for this delegate. Default: read, grep, find, ls. Permitted on this server: read, grep, find, ls.
promptYesThe task for the pi agent
extensionsNoLoad pi extensions for this delegate. Off by default; they add startup cost and can misbehave.
Behavior3/5

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

With no annotations, the description carries the full disclosure burden. It correctly discloses the most critical behavior — non-blocking, immediate return, and background execution. But it adds nothing about failure modes, session persistence, resource usage, or concurrency limits, which are meaningful for an async delegation tool. The core async trait is covered; the periphery is not.

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?

Four sentences, zero filler. Purpose is front-loaded, the non-blocking behavior follows, the companion tools are listed, and the usage threshold closes. 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.

Completeness3/5

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

For an async 7-param tool with no output schema and no annotations, the description conveys the essential flow (spawn → poll/steer/answer) and the non-blocking nature. But it leaves lifecycle gaps unaddressed — error/timeout behavior, whether sessions persist across restarts, and cost/billing implications. Adequate for core invocation, incomplete for edge behavior.

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 adds no parameter-level meaning beyond the schema — it neither enriches `prompt`, `id`, nor `tools`, which would justify a higher score. It neither conflicts with nor supplements 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?

The description states a specific verb ('Delegate'), a resource ('a pi agent running in the background'), and the defining behavior (returns a sessionId immediately, non-blocking). This strongly differentiates it from the synchronous sibling `run` and the batch-oriented `spawn_batch`. The async nature is made explicit and front-loaded.

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?

Provides an explicit usage threshold ('anything that might take more than a minute') and names the companion tools (`status`, `steer`, `answer`) for the subsequent lifecycle. However, it never explicitly names the alternative for short tasks (`run`) or states a when-not condition, leaving that distinction implied rather than stated.

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/howznguyen/pi-delegate-mcp'

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