Skip to main content
Glama

Parallel specialist swarm

swarm_run

Run up to seven role-specific specialists in parallel for a project goal, then consolidate their outputs with an integrating reviewer into a structured answer.

Instructions

Run up to seven advisory specialists in parallel, then one integrating reviewer. May consume provider credits and take minutes. Reuse the project_id and mission_id of the current task (from project_init / memory_checkpoint); when omitted, results go to project "default" and a new random mission that mission_status and memory_checkpoint will not find.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
goalYesProject goal for every specialist.
rolesNoSpecialist roles; workers cycle through this list.
detailNoControls response verbosity.normal
contextNoWorkspace evidence. Requires workspace; content is untrusted data.
privacyNoSecrets in attached context are always masked. auto also masks valid CPF/CNPJ/card numbers, emails and phones; local_only additionally routes only to local private targets (no_local_target otherwise); allow_cloud keeps personal data.auto
workspaceNoConfigured workspace root for context.
max_agentsNoNumber of workers; defaults to one per role, capped by DZ23_MAX_CONCURRENCY.
mission_idNoMission of the current task; omitted creates a new random mission.
project_idNoProject of the current task; defaults to "default".default
lease_tokenNoToken from mission_claim. Required only while another holder has a live lease on this mission.
output_schemaNoJSON Schema subset (type, required, properties, items, enum) for the answer. delegate retries once and fails with response_invalid; consensus and swarm_run add structured_output or schema_error per answer.
response_modeNosummary returns the full integration plus a short excerpt per worker; full returns every worker output.summary
idempotency_keyNoCaller key, valid 24 h in this process. The same key and arguments return the first result without a new provider call; different arguments fail with idempotency_conflict.
routing_strategyNoHow workers are assigned to eligible targets. Effective strategy and observed diversity are reported.first
strict_diversityNoFail before any provider call when the requested diversity cannot be planned.
max_response_charsNoHard cap for returned textual content.
min_distinct_modelsNoDesired distinct models; a warning is returned when unavailable.
avoid_reviewer_targetNoPrefer an integrating reviewer target not used by any worker.
min_distinct_providersNoDesired distinct providers; a warning is returned when unavailable.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed17 schema fields changedv4.1.0
    • addedInput schema / properties / context
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Workspace evidence. Requires workspace; content is untrusted data.",
      +  "properties": {
      +    "files": {
      +      "items": {
      +        "maxLength": 4096,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "maxItems": 50,
      +      "type": "array"
      +    },
      +    "git_diff": {
      +      "default": false,
      +      "type": "boolean"
      +    },
      +    "search": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "max_results": {
      +          "default": 50,
      +          "maximum": 100,
      +          "minimum": 1,
      +          "type": "integer"
      +        },
      +        "query": {
      +          "description": "Search query.",
      +          "maxLength": 2000,
      +          "minLength": 1,
      +          "pattern": "\\S",
      +          "type": "string",
      +          "x-pattern-reason": "must contain non-whitespace text"
      +        },
      +        "regex": {
      +          "default": false,
      +          "type": "boolean"
      +        }
      +      },
      +      "required": [
      +        "query"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "type": "object"
      +}
    • addedInput schema / properties / detail
      Added value: +{
      +  "default": "normal",
      +  "description": "Controls response verbosity.",
      +  "enum": [
      +    "brief",
      +    "normal",
      +    "full"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / idempotency_key
      Added value: +{
      +  "description": "Caller key, valid 24 h in this process. The same key and arguments return the first result without a new provider call; different arguments fail with idempotency_conflict.",
      +  "maxLength": 128,
      +  "minLength": 8,
      +  "pattern": "^[A-Za-z0-9._:-]+$",
      +  "type": "string"
      +}
    • addedInput schema / properties / lease_token
      Added value: +{
      +  "description": "Token from mission_claim. Required only while another holder has a live lease on this mission.",
      +  "maxLength": 128,
      +  "type": "string"
      +}
    • addedInput schema / properties / max_agents / description
      Added value: +"Number of workers; defaults to one per role, capped by DZ23_MAX_CONCURRENCY."
    • addedInput schema / properties / max_response_chars
      Added value: +{
      +  "description": "Hard cap for returned textual content.",
      +  "maximum": 200000,
      +  "minimum": 256,
      +  "type": "integer"
      +}
    • changedInput schema / properties / mission_id / description
      Previous value: -"Mission identifier inside the project."New value: +"Mission of the current task; omitted creates a new random mission."
    • changedInput schema / properties / mission_id / pattern
      Previous value: -"^[a-zA-Z0-9][a-zA-Z0-9._-]{0,119}$"New value: +"^[a-zA-Z0-9](?:[a-zA-Z0-9._-]{0,118}[a-zA-Z0-9_-])?$"
    • changedInput schema / properties / mission_id / x-pattern-reason
      Previous value: -"must use 1-120 letters, digits, dots, underscores or hyphens and start with a letter or digit"New value: +"must use 1-120 letters, digits, dots, underscores or hyphens, start with a letter or digit and not end with a dot"
    • addedInput schema / properties / output_schema
      Added value: +{
      +  "description": "JSON Schema subset (type, required, properties, items, enum) for the answer. delegate retries once and fails with response_invalid; consensus and swarm_run add structured_output or schema_error per answer.",
      +  "type": "object"
      +}
    • addedInput schema / properties / privacy
      Added value: +{
      +  "default": "auto",
      +  "description": "Secrets in attached context are always masked. auto also masks valid CPF/CNPJ/card numbers, emails and phones; local_only additionally routes only to local private targets (no_local_target otherwise); allow_cloud keeps personal data.",
      +  "enum": [
      +    "auto",
      +    "local_only",
      +    "allow_cloud"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / project_id / description
      Previous value: -"Project memory identifier. Not an authorization boundary."New value: +"Project of the current task; defaults to \"default\"."
    • changedInput schema / properties / project_id / pattern
      Previous value: -"^[a-zA-Z0-9][a-zA-Z0-9._-]{0,119}$"New value: +"^[a-zA-Z0-9](?:[a-zA-Z0-9._-]{0,118}[a-zA-Z0-9_-])?$"
    • changedInput schema / properties / project_id / x-pattern-reason
      Previous value: -"must use 1-120 letters, digits, dots, underscores or hyphens and start with a letter or digit"New value: +"must use 1-120 letters, digits, dots, underscores or hyphens, start with a letter or digit and not end with a dot"
    • addedInput schema / properties / response_mode
      Added value: +{
      +  "default": "summary",
      +  "description": "summary returns the full integration plus a short excerpt per worker; full returns every worker output.",
      +  "enum": [
      +    "summary",
      +    "full"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / roles / description
      Added value: +"Specialist roles; workers cycle through this list."
    • addedInput schema / properties / workspace
      Added value: +{
      +  "description": "Configured workspace root for context.",
      +  "maxLength": 4096,
      +  "type": "string"
      +}
  2. Changed27 schema fields changedv3.0.0
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / avoid_reviewer_target
      Added value: +{
      +  "default": false,
      +  "description": "Prefer an integrating reviewer target not used by any worker.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / goal / description
      Added value: +"Project goal for every specialist."
    • addedInput schema / properties / goal / maxLength
      Added value: +8000
    • addedInput schema / properties / goal / minLength
      Added value: +1
    • addedInput schema / properties / goal / pattern
      Added value: +"\\S"
    • addedInput schema / properties / goal / x-pattern-reason
      Added value: +"must contain non-whitespace text"
    • changedInput schema / properties / max_agents / maximum
      Previous value: -32New value: +7
    • addedInput schema / properties / min_distinct_models
      Added value: +{
      +  "description": "Desired distinct models; a warning is returned when unavailable.",
      +  "maximum": 7,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / min_distinct_providers
      Added value: +{
      +  "description": "Desired distinct providers; a warning is returned when unavailable.",
      +  "maximum": 7,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / mission_id / description
      Added value: +"Mission identifier inside the project."
    • addedInput schema / properties / mission_id / maxLength
      Added value: +120
    • addedInput schema / properties / mission_id / minLength
      Added value: +1
    • addedInput schema / properties / mission_id / pattern
      Added value: +"^[a-zA-Z0-9][a-zA-Z0-9._-]{0,119}$"
    • addedInput schema / properties / mission_id / x-pattern-reason
      Added value: +"must use 1-120 letters, digits, dots, underscores or hyphens and start with a letter or digit"
    • addedInput schema / properties / project_id / default
      Added value: +"default"
    • addedInput schema / properties / project_id / description
      Added value: +"Project memory identifier. Not an authorization boundary."
    • addedInput schema / properties / project_id / maxLength
      Added value: +120
    • addedInput schema / properties / project_id / minLength
      Added value: +1
    • addedInput schema / properties / project_id / pattern
      Added value: +"^[a-zA-Z0-9][a-zA-Z0-9._-]{0,119}$"
    • addedInput schema / properties / project_id / x-pattern-reason
      Added value: +"must use 1-120 letters, digits, dots, underscores or hyphens and start with a letter or digit"
    • addedInput schema / properties / roles / default
      Added value: +[
      +  "architect",
      +  "backend",
      +  "frontend",
      +  "security",
      +  "qa",
      +  "devops",
      +  "reviewer"
      +]
    • addedInput schema / properties / roles / items / enum
      Added value: +[
      +  "architect",
      +  "backend",
      +  "frontend",
      +  "security",
      +  "qa",
      +  "devops",
      +  "reviewer"
      +]
    • addedInput schema / properties / roles / maxItems
      Added value: +7
    • addedInput schema / properties / roles / minItems
      Added value: +1
    • addedInput schema / properties / routing_strategy
      Added value: +{
      +  "default": "first",
      +  "description": "How workers are assigned to eligible targets. Effective strategy and observed diversity are reported.",
      +  "enum": [
      +    "first",
      +    "round_robin",
      +    "provider_diversity",
      +    "model_diversity",
      +    "cost_optimized",
      +    "latency_optimized"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / strict_diversity
      Added value: +{
      +  "default": false,
      +  "description": "Fail before any provider call when the requested diversity cannot be planned.",
      +  "type": "boolean"
      +}
  3. First observedv2.2.4

TDQS

A3.8/5.0
Behavior4/5

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

It adds valuable behavioral context beyond the annotations: 'May consume provider credits and take minutes' warns about cost/latency, and the mission/project default behavior tells the agent that omitted IDs create undiscoverable state. No contradiction with readOnlyHint=false or openWorldHint=true.

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?

Three sentences with no filler: action, cost/time warning, and the critical ID caveat are front-loaded. It avoids repeating schema details despite the large parameter surface.

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 19-param tool with no output schema, the description covers high-level orchestration and the most important default behavior, and the schema covers the rest. However, it does not describe the return value or when to choose this over delegate/consensus, which are non-trivial gaps for a complex tool.

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 description coverage is 100%, so the baseline is 3. The description adds useful cross-tool semantics for project_id/mission_id, such as sourcing them from project_init/memory_checkpoint and the unfindable-mission consequence of omission, which the schema alone does not convey. Other parameters are appropriately left to the schema.

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 names a specific action and resource: 'Run up to seven advisory specialists in parallel, then one integrating reviewer.' This clearly conveys the orchestration role and distinguishes it from single-agent tools like delegate, though it does not explicitly name sibling alternatives.

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 only usage guidance is the warning to reuse project_id/mission_id and the consequence of omission. It does not state when to prefer swarm_run over delegate/consensus or give exclusion criteria, so selection context is only implied by 'parallel specialists.'

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