Skip to main content
Glama

agent_spawn

Start a new Claude Code or Antigravity agent session as a controlled subagent, choosing background or tmux mode and passing a prompt, model, and working directory.

Instructions

Start a new agent session. harness=claude uses Claude Code's native background session (preferred — it has a real id and a real log). harness=agy starts a tmux-hosted Antigravity session, because agy has no background mode. mode=tmux forces an interactive tmux session for either harness.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoWorking directory
modeNoauto = background for claude, tmux for agy
nameNoSession name (tmux mode, and used to label the session)
agentNoClaude only: named agent
modelNoModel id
effortNo
promptNoInitial instruction
add_dirNoExtra directories to allow
harnessYesWhich agent to start
mcp_configNoClaude only: --mcp-config paths
permission_modeNoClaude only, e.g. bypassPermissions, acceptEdits, plan

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does disclose non-obvious behavioral facts not present in the schema: claude sessions are true background sessions with an id and log, agy sessions are tmux-hosted because agy lacks a background mode, and mode=tmux forces interactivity. It omits what the call returns (session id/handle) and whether spawning is blocking or resource-intensive.

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?

Three compact sentences, front-loaded with the core action, then the harness tradeoff, then the mode override. Every clause carries decision-relevant information.

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 11-parameter process-spawning tool with no annotations and no output schema, the description covers the harness/mode axis well but says nothing about the session lifecycle (how to check readiness, read output, or stop the spawned agent) or about what the call yields. Adequate but with clear gaps.

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 91%, so the baseline is 3; the description goes beyond the schema by explaining the semantics and interaction of harness and mode (including the auto mapping) rather than just restating enum values. Other parameters (agent, mcp_config, permission_mode) are left entirely to 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?

The description uses a specific verb+resource ('Start a new agent session') and immediately disambiguates its two harness variants, so an agent knows exactly what is being created. It does not, however, distinguish itself from close siblings such as agent_spawn_many or agent_resume, which also create/continue sessions.

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?

It gives real selection guidance: harness=claude is stated as preferred (real id, real log), harness=agy is explained as necessary because agy has no background mode, and mode=tmux is named as the forced-interactive override. It stops short of routing against siblings (e.g. when to prefer agent_spawn_many for batches).

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