Skip to main content
Glama

dispatch

Send a prompt to a project or workspace and receive an identifier immediately. The task runs asynchronously in the background.

Instructions

Dispatch a prompt to a project or workspace. NON-BLOCKING.

name: project name, or @workspace to fan-out to all projects in that workspace. When a workspace is targeted, each member project is dispatched independently and a list of dispatch_ids is returned.

Spawns a one-shot subprocess (e.g. claude -p "..." --continue) in the project's cwd and returns immediately with a dispatch_id (<100ms).

agent (optional): override the project's registered agent for this one dispatch only. Useful for e.g. sending a design-heavy task to a different agent without mutating the registry. Registry is unchanged.

fallback (optional): list of agent names to try in order if the primary agent exits non-zero (e.g. token/rate limit, crash). If omitted, the project's saved fallback from the registry is used. Pass an empty list [] to explicitly disable fallback for this dispatch.

permission_mode controls how the agent handles permission prompts:

  • "bypass" — skip all prompts (default for new projects)

  • "auto" — claude-only; classifier-reviewed actions (Sonnet/Opus 4.6 only)

  • "restricted" — no skip flag; agent may fail on operations needing approval

  • None (default): use the project's saved mode, or "bypass" for new projects. The resolved value is saved to the registry for future dispatches.

session_id (optional): one-shot override for conversation resumption.

  • Given → resume that specific session (agent-specific flag: claude -r <uuid>, codex resume <id>, droid -s <uuid>, opencode -s <uuid>, gemini --resume <index>). After this dispatch the agent's own "resume latest" mechanism picks up the just-used session, so subsequent default dispatches continue from it without restating the id.

  • None (default): use the project's saved session_id if any (persistent pin), otherwise fall back to the agent's "resume latest" flag. Droid has no headless "resume latest", so absence of a session_id means a fresh session on every droid dispatch.

language (optional): one-shot override for the response language.

  • A non-empty string (e.g. "Korean", "ko", "Français", "fr") → prepend a "Respond to the user in ." directive to the prompt.

  • "" (empty string) → suppress the project's saved language for this call (fall back to agent default, usually English) without mutating the registry.

  • None (default) → use the project's saved language, set via update_project(language=...). If unset, no directive is added.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
agentNo
promptYes
resumeNo
timeoutNo
fallbackNo
languageNo
session_idNo
permission_modeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.20.0

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and excels: it reveals side effects (permission_mode resolved value saved to registry), non-blocking return behavior with <100ms latency, subprocess spawning, session continuation side effects, and workspace fan-out behavior. This is far beyond the minimum.

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 front-loaded with the core purpose and non-blocking caveat, then uses clear bolded parameter labels and structured lists. Though long, every sentence adds meaningful detail for a complex async dispatch tool, with no filler or redundancy.

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?

For a 9-parameter tool with no annotations settlement, the description covers the most complex aspects and return behavior thoroughly, including workspace fan-out and registry side effects. The lack of any explanation for `resume` and `timeout` leaves a meaningful gap given the absence of schema descriptions.

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?

Despite 0% schema description coverage, the description adds deep semantics for six parameters (name, agent, fallback, permission_mode, session_id, language) with precise behavior and examples. However, it fails to explain `resume` and `timeout`, leaving two parameters undocumented, so it does not fully compensate for the schema gap.

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 opens with a specific verb and resource: 'Dispatch a prompt to a project or workspace.' It clearly distinguishes this from siblings by emphasizing NON-BLOCKING execution and immediate return of a dispatch_id, which is unique among the listed project tools.

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?

The description clearly conveys when to use the tool: for non-blocking prompt dispatch, with rich context about behavior such as workspace fan-out and one-shot subprocess spawning. It does not explicitly name sibling alternatives or state when not to use it, so it stops short of the top score.

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