Skip to main content
Glama

Run a subagent task on an available CLI backend

swarm_run
Destructive

Delegate a self-contained task to a locally logged-in CLI backend, choosing the profile, model, and inline wait to get fast background results.

Instructions

Delegate a task to the selected CLI backend ('auto', 'codebuddy', 'qoder', or 'zcode'). On CLI backends (codebuddy, qoder), profile defaults to 'lite' (zero tools, minimal token/credit cost; great for fast pure-reasoning/extraction), readonly enables Read/ViewImage/Glob/Grep/WebSearch/WebFetch, and workspace grants full workspace access in cwd. Set waitSec (e.g. 30-55) for single-call inline completion on fast CLI tasks, or omit / 0 to return taskId immediately.

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": {
      "prompt": "<prompt>"
    },
    "name": "swarm_run"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdNoWorking directory for CLI backends (must exist).
modelNoModel ID (e.g. hy4flash-free, deepseek-v4.1-flash, DeepSeek-Flash, Qwen3.8-Flash, GLM-5.3).
promptYesComplete, self-contained task prompt.
backendNoTarget backend: auto (default), codebuddy, qoder, or zcode.
profileNoTool/permission profile: lite (default on CLI backends), readonly, or workspace.
waitSecNoWait up to N seconds inline (0 = async return immediately, max 55).
providerNoZCode-only billing route override.
ephemeralNoDisable session persistence on CLI backends (--no-session-persistence).
fallbackModelNoOptional fallback model when backend supports it (e.g. codebuddy).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already flag destructive=true and openWorld=true, so the safety bar is lower, but the description still adds real context: workspace grants full access in cwd, ephemeral disables session persistence, and callers get either an inline result or an immediate taskId. It never states what is actually mutated or destroyed on the backend, what happens to the workspace, or what failure looks like for a destructive task-running 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?

Front-loads the delegation purpose, then groups profile and waitSec semantics in a dense but readable block with no filler sentences. The parentheticals are long and stack multiple clauses, which costs a little scanability, but each one carries operational information.

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?

Covers the two enums that matter most and the sync/async return shape, which is the key gap given there is no output schema. For a 9-parameter destructive, open-world execution tool, it still leaves out what the inline result contains, how failures surface, and how the backend versus sibling-tool tradeoff should be decided.

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?

Schema coverage is 100%, so baseline is 3, and the description earns a bump by explaining the meaning of the profile enum (lite = zero tools, readonly = Read/ViewImage/Glob/Grep/WebSearch/WebFetch, workspace = full access) and the practical range for waitSec. It adds no meaning for cwd, ephemeral, provider, or fallbackModel beyond what the schema already says.

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?

States a specific verb and resource: "Delegate a task to the selected CLI backend" and enumerates the backend choices. An agent knows exactly what the call does. It does not, however, distinguish itself from close siblings such as swarm_run_structured, zcode_run, or swarm_batch_run, so the reader must open the schemas to route correctly.

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?

Gives useful conditional guidance for parameter choice (set waitSec 30-55 for fast single-call inline work; omit or 0 for async taskId) and explains that lite is appropriate for pure-reasoning/extraction. It offers no guidance on when to use this tool rather than the structured, batch, or zcode-prefixed variants, which is the harder routing decision the agent faces.

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