Skip to main content
Glama

Run a structured JSON-contract task on a swarm backend

swarm_run_structured
Destructive

Execute bounded JSON Schema tasks with optional domain rules on auto, CodeBuddy, or ZCode backends; set waitSec to wait for inline schema validation.

Instructions

Execute a bounded JSON Schema + optional domainRule task on 'auto' (default), 'codebuddy', or 'zcode'. CLI backends default to zero-tool 'lite' profile; set waitSec > 0 to wait and validate inline.

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": {
      "task": "<task>",
      "input": "<input>",
      "schema": "<schema>"
    },
    "name": "swarm_run_structured"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdNo
taskYes
inputYes
modelNo
schemaYes
backendNo
profileNo
waitSecNo
providerNo
ephemeralNo
domainRuleNo
fallbackModelNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

B3.1/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, openWorldHint=true, readOnlyHint=false, and the description does not contradict them. Beyond that it adds real behavioral context -- the profile default per backend type and the fact that waitSec > 0 changes the call into a waiting, inline-validating invocation. It omits cost, rate/quota implications, and what exactly the destructive capability can touch.

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?

Two dense sentences, front-loaded with the core action and followed by operational defaults; little wasted wording. The backend enumeration error and the unexplained term 'bounded' cost it a point.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 12-parameter, non-idempotent, destructive, open-world execution tool with no output schema, the definition is thin: it never says where results go or that a sibling like swarm_structured_result retrieves them, does not explain the readonly/workspace profiles, and leaves nine parameters undocumented.

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?

Schema description coverage is 0% across 12 parameters, so the description carries the full burden, and it explains only three loosely: backend (and even then it lists 'auto', 'codebuddy', 'zcode' while omitting the schema's 'qoder' enum value), the default profile, and waitSec. 'task', 'input', 'schema', 'domainRule', 'model', 'fallbackModel', 'provider', 'cwd', and 'ephemeral' get no explanation of meaning or interaction.

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 description gives a specific verb ('Execute') and a specific resource ('bounded JSON Schema + optional domainRule task') and enumerates backends, so an agent knows what the tool does. It does not differentiate itself from the very similar 'zcode_run_structured' sibling, which is the main remaining gap.

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?

It supplies useful operational cues: 'auto' is the default backend, CLI backends default to the 'lite' profile, and waitSec > 0 causes the call to wait and validate inline. It never states when to prefer this over zcode_run_structured or swarm_run, nor when to avoid the blocking wait or which profile to pick for a given workload.

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