Skip to main content
Glama

spawn_agent

Create a manager or child AI agent on a chosen backend, optionally assigning a task, model, workdir, and instructions to start multi-agent workflows.

Instructions

Create an agent. backend: codex (ChatGPT/Codex), antigravity, claude-code, ollama, lmstudio, vllm, or another name from fleet_status. role: 'manager' (can create its own child agents) or 'child'. Managers can only create children. If task is given it is sent as the first message. workdir (lead only) points the agent at an existing folder, e.g. a code repo.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "name": "<name>",
      "backend": "<backend>"
    },
    "name": "spawn_agent"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes
roleNomanager
taskNo
modelNo
backendYes
workdirNo
parent_idNo
instructionsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations at all, the description carries the full behavioral burden and partially discharges it: it discloses the role hierarchy constraint, that a supplied task is delivered as the first message, and that workdir targets an existing folder. It does not disclose whether the call blocks until the agent is ready, what happens on duplicate names, what is returned (an id? a handle?), or what resources spawning consumes.

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?

The text is compact and front-loaded, leading with the action and then grouping backend, role, task, and workdir notes with zero filler. Minor friction comes from the undefined term "lead" and the dangling reference to fleet_status, but nothing is padded.

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 8-parameter mutation-style tool with no annotations and no output schema, the description is only partially sufficient: it explains the creation model and four parameters but leaves the return value, failure modes, and the remaining four parameters to guesswork. It is minimum viable rather than 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?

Schema description coverage is 0% across 8 parameters, so the description must compensate, and it covers only about half: backend (with a value list), role (with semantics and constraints), task (delivery timing), and workdir (with an example). name, model, parent_id, and instructions are left entirely undefined, and the workdir note says "lead only" while the schema's role vocabulary is manager/child, introducing a terminology mismatch.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a concrete verb+resource ("Create an agent") and immediately enumerates the backend universe (codex, antigravity, claude-code, ollama, lmstudio, vllm, or a name from fleet_status), which makes the tool's scope unmistakable. It also distinguishes the two agent kinds via role. It stops short of contrasting itself with siblings like adopt_conversation or send_message, but the core purpose is clear.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied rather than stated: the manager/child hierarchy rule ("Managers can only create children") and the pointer to fleet_status for valid backend names are genuinely useful routing hints. However, there is no explicit statement of when to spawn versus when to reuse/adopt an existing agent or conversation, and no prerequisites (auth, quotas, name uniqueness) are given.

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