Skip to main content
Glama

mavis_spawn_worker

Spawn an independent worker agent for code review, testing, or verification tasks. The agent runs as a child session and reports results back.

Instructions

Spawn a single-shot worker/verifier agent as a child session. Use for code review, test, verify tasks. The agent runs independently and reports back. For complex multi-agent tasks, use mavis_team_plan instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agentYesAgent name (e.g. general, coder, verifier)
promptYesTask description for the worker agent
workspaceNoWorking directory for the worker
parentSessionNoParent session ID (for result routing)

Implementation Reference

  • The tool specification (spec object) for 'mavis_spawn_worker'. This is the full definition including the buildArgs function that constructs the command line args for spawning a worker agent. The handler is executed via runTool which calls execMavis (or execMavisJSON) with the built args. In this spec, there is no execFn set, so the default path uses execMavisJSON (line 84) which spawns the mavis CLI binary with ['session', 'new', agent, '--from', parentSession|'root', '--workspace', workspace?, '--prompt', prompt].
    {
      name: 'mavis_spawn_worker',
      description: 'Spawn a single-shot worker/verifier agent as a child session. Use for code review, test, verify tasks. The agent runs independently and reports back. For complex multi-agent tasks, use mavis_team_plan instead.',
      inputSchema: z.object({
        agent: z.string().describe('Agent name (e.g. general, coder, verifier)'),
        prompt: z.string().describe('Task description for the worker agent'),
        workspace: z.string().optional().describe('Working directory for the worker'),
        parentSession: z.string().optional().describe('Parent session ID (for result routing)')
      }),
      buildArgs: ({ agent, prompt, workspace, parentSession }) => {
        const args = ['session', 'new', agent];
        if (parentSession) args.push('--from', parentSession);
        else args.push('--from', 'root');
        if (workspace) args.push('--workspace', workspace);
        args.push('--prompt', prompt);
        return args;
      }
Behavior4/5

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

With no annotations, the description shoulders behavioral disclosure. It indicates the agent runs independently, is single-shot, and reports back, though lacks details on blocking/async and result format.

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 short, front-loaded sentences with no fluff: defines action, gives usage, contrasts with sibling.

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?

Covers purpose, usage, and alternative; lacks output specification, but no output schema exists to supplement.

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 schema handles parameter descriptions; the description adds no extra parameter info, meeting 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 tool spawns a single-shot worker/verifier agent as a child session, specifies use cases (code review, test, verify), and distinguishes from sibling mavis_team_plan.

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

Usage Guidelines5/5

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

Explicitly says use for single-shot tasks like code review, test, verify, and directs to mavis_team_plan for complex multi-agent tasks.

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/Cunning-Kang/mavis-mcp-server'

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