Skip to main content
Glama

delegate_many

Run several dependent tasks in parallel with per-task verification, write scopes, and rollback to coordinate bounded work across workers.

Instructions

Give the executor several tasks with an order, each one a contract of its own.

tasks: a list of objects with name short unique name goal what to do, self-contained, with concrete targets verify_commands checks of this task that can fail (list of shell commands, required) write_globs files this task may write (list of globs, required) constraints explicit checkable requirements (required when the checks only look for text) after names of the tasks that must succeed first (list) context facts for this task (optional) immutable read-only files or globs for this task (optional) workers: tasks run side by side, for a server with several request slots (default 1).

A task starts when the tasks it comes after are verified. A task whose prerequisite failed is cancelled with the reason and not started. Two tasks that run at the same time cannot write the same file: the first to write it owns it until it ends. Each task has its own job, receipt, diff and rollback; job_rollback of the batch undoes all of them, newest first.

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": {
      "tasks": "<tasks>",
      "workspace": "<workspace>"
    },
    "name": "delegate_many"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNo
tasksYes
contextNo
workersNo
allow_runNo
immutableNo
max_stepsNo
workspaceYes
read_globsNo
max_repairsNo
wait_secondsNo
checks_networkNo
unjailed_checksNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv3.6.1
    • addedInput schema / $defs
      Added value: +{
      +  "BatchTaskSpec": {
      +    "properties": {
      +      "after": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "title": "After",
      +        "type": "array"
      +      },
      +      "checks_network": {
      +        "title": "Checks Network",
      +        "type": "boolean"
      +      },
      +      "constraints": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "title": "Constraints",
      +        "type": "array"
      +      },
      +      "context": {
      +        "title": "Context",
      +        "type": "string"
      +      },
      +      "goal": {
      +        "title": "Goal",
      +        "type": "string"
      +      },
      +      "immutable": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "title": "Immutable",
      +        "type": "array"
      +      },
      +      "name": {
      +        "title": "Name",
      +        "type": "string"
      +      },
      +      "read_globs": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "title": "Read Globs",
      +        "type": "array"
      +      },
      +      "unjailed_checks": {
      +        "title": "Unjailed Checks",
      +        "type": "boolean"
      +      },
      +      "verify_commands": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "title": "Verify Commands",
      +        "type": "array"
      +      },
      +      "write_globs": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "title": "Write Globs",
      +        "type": "array"
      +      }
      +    },
      +    "title": "BatchTaskSpec",
      +    "type": "object"
      +  }
      +}
    • addedInput schema / properties / read_globs
      Added value: +{
      +  "default": [],
      +  "items": {
      +    "type": "string"
      +  },
      +  "title": "Read Globs",
      +  "type": "array"
      +}
    • addedInput schema / properties / tasks / items / $ref
      Added value: +"#/$defs/BatchTaskSpec"
    • removedInput schema / properties / tasks / items / additionalProperties
      Removed value: -true
    • removedInput schema / properties / tasks / items / type
      Removed value: -"object"
  2. First observedv3.0.1

TDQS

B3.4/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and largely delivers: it discloses dependency gating, that tasks with failed prerequisites are cancelled rather than started, that concurrent tasks cannot write the same file (first writer owns it), and that each task gets its own job/receipt/diff/rollback with batch rollback via `job_rollback` newest-first. It omits blocking behavior and timeouts (the `wait_seconds`/`max_steps` limits), permissions, and cost, which are meaningful gaps for a long-running batch tool.

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

Conciseness4/5

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

Well front-loaded: the one-line purpose precedes a tidy field-by-field list, then the runtime semantics are grouped into a short block. The alignment of field names and glosses makes scanning easy; a few phrases ("each one a contract of its own") are atmospheric rather than informative, but the overall size is justified by the tool's complexity.

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?

An output schema exists, so return shapes needn't be spelled out, and the description covers the task-spec semantics thoroughly. For a 13-parameter, annotation-free batch orchestration tool it still leaves real gaps: no explanation of timeouts or blocking (`wait_seconds`, `max_steps`, `max_repairs`), no mention that `workspace` is mandatory or what it scopes, and nothing on `model` or `allow_run`.

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 0%, so the description must compensate, and it does so well for the nested task spec: name, goal, verify_commands, write_globs, constraints, after and context each get a plain-language gloss, with "required" tags and the useful rule that constraints are needed when checks only look for text. However, nearly all top-level parameters go undocumented — including `workspace`, which is required, plus `model`, `max_steps`, `max_repairs`, `wait_seconds`, `allow_run`, `read_globs`, `checks_network`, `unjailed_checks` and batch-level `context`/`immutable` — so the agent is left guessing on most of the 13-parameter surface.

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?

The opening sentence states a specific action and resource: dispatching several ordered tasks to an executor, each with its own contract. "Several tasks" implicitly contrasts with the singular `delegate` sibling, but the description never names that alternative, so the differentiation rests on the reader inferring it from the name.

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

Usage Guidelines2/5

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

There is no explicit statement of when to reach for this tool over `delegate`, or when a single task beats a batch. The closest thing to guidance is the dependency/ordering explanation ("A task starts when the tasks it comes after are verified"), which describes mechanics rather than selection criteria.

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