Skip to main content
Glama

spawn_agent

Creates a new interactive subagent with a defined role and system prompt so orchestrators can delegate specialized tasks and control allowed tools or provider.

Instructions

Spawn a new interactive agent with a specific role and system prompt.

Input Schema

NameRequiredDescriptionDefault
nameYesHuman-readable name for the agent
roleYesRole description (e.g. "Senior Engineer", "Researcher")
providerNoWhich inference provider to use (from config)
allowed_toolsNoTool names the agent can use (default: all)
system_promptYesSystem prompt defining the agent behavior

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden for a mutating/creating tool, yet says nothing about resource cost, whether the new agent starts running immediately, whether it persists after the call, or that it likely must later be cleaned up via terminate_agent. None of the lifecycle consequences are disclosed.

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?

A single front-loaded sentence with no filler, which is efficient. It is arguably too terse for a five-parameter creation tool, but that shortfall is better attributed to completeness than to verbosity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

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

For a creation tool with no annotations and no output schema, the description omits what the call returns (agent identifier?), whether spawning is immediate or queued, and how the new agent relates to the surrounding session/agent tools. An agent cannot call this confidently without reading the schema and guessing the lifecycle.

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 coverage is 100% with per-parameter descriptions, and the description merely restates two of the five fields (role, system prompt), adding little. The word "interactive" hints at behavior but gives no guidance on provider or allowed_tools semantics beyond the schema.

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?

States a specific verb and resource ("Spawn a new interactive agent") plus what defines it (role and system prompt), so the purpose is unambiguous. It does not, however, differentiate itself from siblings like start_swarm (multi-agent) or invoke_session, which an agent must choose between.

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

Usage Guidelines2/5

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

There is no when-to-use or when-not-to-use guidance, no mention of prerequisites, and no reference to the obvious alternatives (start_swarm for a fleet, invoke_session for an existing agent). The agent must infer the choice from the sibling names alone.

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