Skip to main content
Glama

dispatch_batches

Returns currently parallelizable workflow step batches with prompts and upstream results so a host agent can dispatch subagents concurrently. Reinvoke when failures or skips change gate conditions.

Instructions

方案B入口:返回当前可并行的步骤批次 [{stepIds, prompts, upstreamResults}](批内并行、批间串行,按"全部成功"投影分组)+ runtimeDefaults(服务器级默认模型/超时/轮数/工具),宿主 agent 拿批次并行派子代理执行,每个完成后用 complete_step 回填;若中途有失败/跳过导致门条件变化,重新调用本工具取新批次。

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "id": "<id>"
    },
    "name": "dispatch_batches"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose non-obvious behavior: intra-batch parallelism vs inter-batch seriality, the 'all success' projection used for grouping, what runtimeDefaults contains, and the state-change condition that requires re-invocation. It omits whether the call is read-only/side-effect free and what permissions or run state it presupposes.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded in the opening clause, and no sentence is purely filler, but the whole definition is a single run-on sentence dense with nested parentheses and mixed inline payload notation. Splitting the lifecycle rules (dispatch → complete_step → re-call) into separate sentences would improve scanability without adding length.

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?

Because there is no output schema, the description usefully spells out the return structure and the runtimeDefaults contents, and it explains the iterative lifecycle around gate conditions. The remaining gap is the unexplained id parameter and unstated prerequisites (e.g., whether a run must already exist).

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There is exactly one parameter, id, with 0% schema description coverage, and the description never mentions it — it is unclear whether id refers to a workflow, a run, or a step group. With the schema providing no semantics, the description should have compensated and does not.

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 — 'returns the currently parallelizable step batches' — and immediately specifies the returned payload shape ({stepIds, prompts, upstreamResults}) plus the runtimeDefaults bundle. An agent can tell this is the batching/dispatch entry point rather than a single-step navigator like next_step.

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 clear operational context: the host agent pulls batches, dispatches sub-agents in parallel, backfills each with complete_step, and re-calls this tool if failures or skips change gate conditions. It names complete_step as the follow-up, but never contrasts itself with single-step siblings such as next_step or explains when a serial path would be preferable.

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