Skip to main content
Glama

spawn_agent

Create an AI agent to perform a given task, returning the outcome or a follow-up question if clarification is required.

Instructions

Spawn an AI agent to work on a task. Returns a question if the agent needs clarification, or a result when done.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoWorking directory for the agent process
taskYesTask description to send to the agent
agentYesAgent name (e.g. "claude", "codex", "gemini", "aider")
modelNoModel to use (e.g. "o3", "gpt-5.4", "claude-sonnet-4", "gemini-2.5-pro"). Passed via --model flag to the agent CLI.
retryNoAuto-retry on failure (default: false).
contextNoOptional task context
escalateNoOn retry, escalate thinking level automatically (default: false). Requires retry: true.
thinkingNoThinking/reasoning depth level (e.g. "low", "medium", "high", "max"). Controls how deeply the agent reasons.
timeoutMsNoTimeout in milliseconds (default: 3600000)
Behavior3/5

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

The description adds that the tool returns a question or result, indicating an interactive loop. However, given openWorldHint=true, it omits key behaviors like potential side effects (e.g., file creation, network access), concurrency, or lifecycle. No contradiction with annotations.

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 extraneous information. The first sentence states the core action, the second clarifies the return behavior. Every phrase earns its place, and the structure is front-loaded with the primary function.

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?

The description covers basic purpose and return type, but lacks details on result format, async behaviour (if any), timeout behavior, and how the agent's work is surfaced. Given the complex nested context parameter and absent output schema, additional clarity would improve completeness.

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%, so baseline is 3. The description does not add parameter-specific details beyond what is already in the schema; it is generic. The schema already describes each parameter adequately, so the tool definition is acceptable but not enhanced.

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 tool spawns an AI agent to work on a task, and mentions the dual return types (clarification question or result). This directly distinguishes it from sibling tools like kill_agent, reply, and spawn_agents (the plural variant).

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?

The description implies usage when an agent is needed to autonomously perform a task, but provides no explicit guidance on when to choose this tool over alternatives like spawn_agents, nor when not to use it. No context or exclusion criteria are mentioned.

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/mikusnuz/agent-link-mcp'

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