Skip to main content
Glama

dispatch_task

Assign development tasks to a Claude CLI subagent in sync mode to wait for results or async mode to run in the background and receive a task ID.

Instructions

派发任务给 Claude CLI 子代理。sync 模式等待完成返回结果,async 模式后台执行立即返回 task_id。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNo执行模式,默认 sync
modelNo模型名称(如 claude-sonnet-4-20250514)
promptYes任务描述/指令
max_turnsNo最大对话轮次
allowed_toolsNo工具白名单(如 ["Bash", "Read", "Edit"])
system_promptNo自定义系统提示(如:你是代码审查专家)
working_directoryNo工作目录,默认为项目根目录

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It does disclose a key behavioral trait beyond the schema: sync blocks until completion and returns results, while async returns immediately with a task_id. However, it omits side effects, failure modes, resource implications of spawning a CLI subagent, and how the async result is later retrieved — meaningful gaps for a zero-annotation tool.

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, no filler: the first establishes the verb+resource, the second front-loads the two execution modes with their consequences. Every clause earns its place, and the most decision-relevant information (sync vs. async behavior) is placed immediately after the purpose statement.

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 a 7-parameter tool the schema covers parameter semantics fully, and the description covers the core execution behavior. But with no output schema and no annotations, the description should explain the return shape of sync results and the async follow-up flow (e.g., that async task_id can be queried via get_task_status/get_task_result). These omissions leave an agent guessing about the post-dispatch workflow.

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 description coverage is 100%, so the schema already documents all 7 parameters and the baseline is 3. The description adds some value by tying 'mode' to concrete behavioral outcomes (sync returns results, async returns task_id), which the schema's '执行模式,默认 sync' does not, but it adds nothing about the other six parameters. Adequate but not compensating-driven.

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?

Description states a specific verb+resource: '派发任务给 Claude CLI 子代理' (dispatch tasks to Claude CLI subagents), and adds a concrete behavioral distinction between sync (wait for results) and async (background, immediate task_id). This is clear enough to separate it from status/result/list/stop siblings by verb alone, but it never explicitly names a sibling or the case it is not (e.g., dispatch_parallel), so it stops short of a 5.

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 gives explicit mode-level guidance: choose sync when you want to wait and receive results, async for background execution with immediate task_id. However, there is no tool-level guidance versus alternatives — notably dispatch_parallel, which is the most confusable sibling — and no exclusions or prerequisites (e.g., that async tasks should later be polled via get_task_status/get_task_result). Usage is implied rather than fully routed.

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