Skip to main content
Glama

dispatch_task

Deploy an autonomous Claude Code agent to handle coding tasks in a given project directory, running in the background for parallel delegation.

Instructions

Deploy a Claude Code agent to work on a task in a specific project directory. The agent runs autonomously with full Claude Code capabilities including sub-agent spawning, file editing, bash execution, etc. Use this to delegate coding tasks to background agents. IMPORTANT: After dispatching, return to the conversation immediately. Do NOT call check_tasks or get_task_output unless the user explicitly asks for a status update.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNo'solo' (default) runs a single agent. 'team' instructs the lead agent to decompose the task and spawn specialized sub-agents that work in parallel, then synthesize results.
taskYesClear description of the task for the Claude Code agent to perform
modelNoOptional model override (e.g. 'opus', 'sonnet'). Defaults to Claude Code's configured model.
permission_modeNoPermission mode for the agent. 'acceptEdits' auto-approves file edits. 'bypassPermissions' skips all checks (use carefully).
working_directoryYesAbsolute path to the project directory (e.g. /home/robbhimself/GarbageFire)
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses that the agent runs autonomously, has capabilities like sub-agent spawning, file editing, and bash execution, and operates in the background. It also warns the caller to return immediately rather than poll for status. However, it does not detail the return value or potential side effects of bash execution.

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?

The description is compact and front-loaded, with four sentences that each add value. The important behavioral warning is clearly highlighted with 'IMPORTANT:'. No wasted words.

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?

The description provides strong context for a 5-parameter tool with no annotations and no output schema. It covers purpose, usage, capabilities, and async behavior. However, it omits what the dispatch call returns (e.g., task ID), which would be useful since there is no output schema and the user may need to reference the task later.

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 the baseline is 3. The description does not add much parameter-specific semantics beyond the schema; it mentions 'specific project directory' and 'task' but the schema already describes these clearly. The 'mode' and 'permission_mode' enums are only covered in the schema.

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's purpose: 'Deploy a Claude Code agent to work on a task in a specific project directory' and 'Use this to delegate coding tasks to background agents.' It distinguishes this tool from sibling status/management tools by focusing on delegation, not checking or modifying tasks.

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 when to use it ('Use this to delegate coding tasks to background agents') and gives clear when-not guidance: 'After dispatching, return to the conversation immediately. Do NOT call check_tasks or get_task_output unless the user explicitly asks for a status update.' This also indirectly names sibling alternatives check_tasks and get_task_output.

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/robbhimself-1337/claude-army'

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