Skip to main content
Glama

spawn_batch

Launch multiple delegate tasks in one batch with pre-validation to avoid partial runs; poll results via sessions.

Instructions

Fan out several delegates in one call. Each task inherits the batch-level model, cwd, tools and extensions unless it overrides them. The whole batch is validated before any delegate starts, so a bad model name or a duplicate id fails everything instead of leaving half a fan-out running. Poll the result with sessions, which reports all of them at once, rather than one status per delegate.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoDefault working directory for every task in this batch
modelNoDefault model for every task in this batch
tasksYes1 to 10 delegates to start
toolsNoDefault tool allowlist for every task in this batch
idPrefixNoNames the tasks `<prefix>-01`, `<prefix>-02`, ... e.g. "audit" gives "audit-01"
extensionsNoDefault extensions setting for every task in this batch
Behavior4/5

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

With no annotations, the description fully covers behavioral traits: whole-batch validation before any start, failure semantics for bad model or duplicate id, and inheritance/override rules. It discloses key outcomes and edge-case behavior, though it does not mention async execution or session cleanup.

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 with no filler. The core purpose and key behavior are front-loaded; the polling guidance is a natural close. Every clause serves a purpose.

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?

Given no output schema and no annotations, the description covers purpose, validation, inheritance, and polling—enough for correct invocation. Minor gaps like precise return format are covered by the `sessions` reference, so it is nearly complete for the complexity level.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with descriptions for all 6 parameters, so baseline is 3. The description adds meaningful semantics beyond the schema: it explains how batch-level defaults are overridden per task, clarifies the idPrefix format, and states the validation impact on parameters. This elevates it above the baseline.

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 action: 'Fan out several delegates in one call.' It specifies the resource (delegates) and the batch nature, distinguishing it from the single-delegate spawn. The inheritance and validation details further clarify its exact role.

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 explicitly advises polling with `sessions` instead of per-delegate `status`, giving concrete guidance on expected follow-up. It implies batch use case but does not explicitly contrast with `spawn` for single-delegate scenarios, leaving some room for inference.

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