subagent-swarm-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| QODER_BIN | No | Explicitly specify the path to the qodercli executable. Auto-detected by default. | |
| CODEBUDDY_BIN | No | Explicitly specify the path to the codebuddy executable. Auto-detected by default. | |
| QODER_MAX_RUNNING | No | Maximum number of concurrent Qoder tasks. | 4 |
| ZCODE_MCP_CDP_PORT | No | Local ZCode DevTools debugging port on 127.0.0.1. | 9222 |
| QODER_DEFAULT_MODEL | No | Default model for Qoder. | DeepSeek-Flash |
| ZCODE_MCP_PROVIDERS | No | ZCode billing route allowlist. | account%3Abigmodel-individual-coding-plan,account%3Abigmodel-start-plan |
| CODEBUDDY_DEFAULT_CWD | No | Default working directory for CLI subagents. Defaults to the value of ZCODE_MCP_PROJECT_DIR. | ZCODE_MCP_PROJECT_DIR |
| CODEBUDDY_MAX_RUNNING | No | Maximum number of concurrent CodeBuddy tasks. | 4 |
| ZCODE_MCP_MAX_RUNNING | No | Maximum number of concurrent ZCode tasks. | 3 |
| ZCODE_MCP_PROJECT_DIR | No | Project directory used as the default working directory for CLI subagents; referenced as the default for CODEBUDDY_DEFAULT_CWD. | |
| ZCODE_MCP_LOCAL_MODULE | No | Set to none to validate pure mode without the private extension module. | |
| CODEBUDDY_DEFAULT_MODEL | No | Default model for CodeBuddy. | hy4flash-free |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| zcode_run_structuredA | Start a normal ZCode session with a bounded JSON schema contract and optional domain semantic rule preset (e.g. section-outline-v1, or a declarative rule object). This uses subscription quota and FULL ACCESS like zcode_run. The schema and domainRule are stored in the session prompt; use zcode_structured_result after completion. |
| zcode_structured_resultA | Recover the original schema and optional domainRule/input from the session and validate the final JSON answer. Invalid, unfinished, failed and cancelled tasks never count as valid. |
| zcode_batch_runC | Execute or resume a low-CPU structured batch with deterministic item keys, append-only JSONL checkpoints (manifest.jsonl, results.jsonl, summary.json, blocked.json), bounded retry (0 or 1), and circuit breaking on quota/rate-limit, login blockers, or provider route mismatch. |
| zcode_batch_statusB | Read the current checkpointed manifest, item statuses, aggregated token usage, and any circuit-breaker blocker for a batchId. |
| zcode_runA | Delegate a task to a GLM subagent running in the official ZCode desktop app (uses the user's GLM Coding Plan quota). Returns a taskId immediately; the task runs in the background. Use zcode_wait to block until it finishes, or zcode_status to poll. The subagent runs with FULL ACCESS (shell, file read/write anywhere the OS user can) in the project folder /root/projects/subagents. It cannot see this conversation, so put ALL needed context in the prompt: goal, absolute file paths, constraints, and the exact output format you want back. Prefer small, well-scoped tasks. Several tasks may run in parallel (limit 3). Models: GLM-5.3 | GLM-5.3-Flash (default GLM-5.3; Flash is faster and cheaper for simple work). provider picks the billing route (the model menu lists the same names under both): account%3Abigmodel-individual-coding-plan = BigModel 个人 (default), account%3Abigmodel-start-plan = Start Plan 免费. |
| zcode_statusA | Non-blocking status of a task: running | completed | failed | cancelled | starting. While running it includes elapsedSec, the tool currently executing, tool call count and idleSec (seconds since the last activity; |
| zcode_session_model_ioA | Read one retained model IO JSONL record for a session. Recording may be absent or incomplete. Returns metadata and tool names by default; includeContent also returns assistant text and tool arguments. Never returns request headers or full prompt; not a per-token event stream. Records over 1 MiB are reported and not skipped. |
| zcode_session_eventsA | Read a bounded page of existing ZCode JSONL lifecycle events for a session. Pass the returned cursor on subsequent calls. This is not the v4 stream: assistant text and tool arguments/results are unavailable. The first call starts at the newest log by default, or the oldest retained log with start=oldest; gaps report incomplete history, rotation, truncation or unreadable records. |
| zcode_session_part_contentA | Read UTF-8 JSON bytes of an assistant text or tool snapshot in base64 chunks. Pass version as expected on subsequent pages; updates normally invalidate the read, but same-millisecond same-size changes may be missed. Content may contain task text, tool arguments and output. |
| zcode_session_partsA | Read a page of assistant text and tool part snapshots from ZCode's SQLite database. This is not a live event stream: parts can change and pagination cannot detect changes to earlier rows. Content is omitted by default; opting in may expose task text, tool arguments and results. Parts above 8192 bytes are omitted, and the cursor sorts by ID, not chronological order. |
| zcode_waitA | Block until the task finishes or timeoutSec elapses (default 45, max 55 so it stays under typical 60s tool-call timeouts), then return its status; when finished the result text is included. If it returns status 'running', just call zcode_wait again. Prefer this over tight polling. |
| zcode_resultA | Final answer text of a finished task (plus token usage). For a task still running this returns its status without a result. |
| zcode_progressA | Cheap Gemini Flash digest (via the agy CLI) of what the task's subagent has done so far: summary, done/doing/next, an estimated progressPct against the task prompt, onTrack, concerns and needsAttention. Works while the task runs and after it finishes (summary of the whole run). Digests are cached per task for ZCODE_MCP_SUMMARY_MIN_SEC seconds (default 300) and only recomputed when new activity exists; set refresh to bypass the cache. For unattended watching prefer bin/zcode-watch.mjs (see README) over polling this. |
| zcode_followupA | Continue a FINISHED task with another message in the same ZCode conversation (it keeps its earlier context). Returns immediately; use zcode_wait afterwards. The task must not be running, and must still be visible in ZCode's sidebar (not archived). |
| zcode_cancelA | Stop a running task (clicks ZCode's stop button). Work already done on disk is not rolled back. |
| zcode_listC | Recent (non-archived) tasks in the subagent project with their status. |
| zcode_quotaA | Read the remaining quota percentages displayed by the official ZCode UI on demand. May be cached; account and provider cannot be verified, reset times are display text, and missing windows mean unknown. Temporarily opens and closes the context popover; never presses reset or reads credentials. |
| zcode_healthA | Verify ZCode is running with its debugging port, the subagent project exists, and report how many tasks are running. |
| hub_postA | Queue a task for the dispatch hub's workers (ZCode / CLI agents on the hub host, manual workers on remote machines). Returns once the task is queued; a daemon assigns and runs it, and hub_wait wakes you when it needs attention. The task body must be self-contained (the worker cannot see this conversation). Code tasks need repo (absolute path on the hub host) and base (commit sha); the worker's changes come back as a patch that is replayed and checked by the hub's acceptance step. |
| hub_boardA | All tasks in the dispatch hub with state, assignee and latest note. States: queued, assigned, running, done, need-info, failed, accepted, rejected, cancelled. |
| hub_showB | Full task record: spec, note, the instructions given to the worker, the master answer, and (once done) the worker's report. |
| hub_waitA | Block until the hub needs the master's attention (a task entered need-info / failed / rejected, or the hub went idle after a change) or timeoutSec elapses (default 55, max 55). Returns { timedOut, lines }; if timedOut, just call hub_wait again. |
| hub_answerA | Reply to a task in need-info; it goes back to the same worker (a ZCode worker continues its session with the answer). |
| hub_cancelB | Cancel a task that is not finished. Terminal: accepted, cancelled (and failed/rejected until requeued). |
| hub_requeueA | Put a failed / rejected / cancelled task back into the queue with its assignee cleared. |
| hub_assignB | Assign a queued (or assigned) task to a specific worker yourself, bypassing the scheduler. See hub_board / the workers roster for ids. |
| hub_tellA | Append a short message (collapsed to one line, max 300 chars) to the task's inbox. The worker sees INBOX lines on its next hub say/inbox/next and is expected to follow them. Use for nudges and clarifications that do not need a state change (unlike hub_answer, which replies to need-info). |
| hub_logA | One merged, time-sorted line per event on a task: state changes (the hub's commit subjects), worker PROGRESS lines and INBOX messages. A cheap way to see how a task is going without hub_show's full payload; for unattended watching prefer |
| codebuddy_usageA | CodeBuddy/WorkBuddy account credit (read-only billing API, cached 10 min, with expiring-soon package alerts) + deduplicated local consumption across both CLI JSONL transcripts and swarm cb-runs state files (including ephemeral runs): tokens & cache-hit rate, per-model/per-profile unit economics, daily breakdown, top tasks, and burn-rate runway forecast. |
| swarm_backendsA | Inspect registered subagent CLI/UI backends (codebuddy, qoder, zcode), their availability, supported models, profiles, and active/max concurrency. |
| swarm_runA | Delegate a task to the selected CLI backend ('auto', 'codebuddy', 'qoder', or 'zcode'). On CLI backends (codebuddy, qoder), |
| swarm_waitA | Block until a cb_* or sess_* task reaches a terminal state or timeoutSec elapses (default 45, max 55). Returns status and final result when complete. |
| swarm_statusA | Non-blocking status check for any cb_* or sess_* task, reconciling dead worker processes automatically. |
| swarm_resultA | Return the final result text, model info, and token/credit usage for a finished cb_* or sess_* task. |
| swarm_followupB | Continue a finished, non-ephemeral cb_* or sess_* task in the same conversation session. |
| swarm_cancelC | Terminate a running cb_* process group or click Stop on a running sess_* ZCode task. |
| swarm_listB | List recent tasks from CodeBuddy, Qoder, ZCode, or all merged newest-first. |
| swarm_quotaB | Read available quota/usage information from CodeBuddy, Qoder, ZCode UI, or all ( |
| swarm_run_structuredB | 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. |
| swarm_structured_resultA | Recover the stored JSON Schema + domainRule contract for a cb_* or sess_* task and validate its output. |
| swarm_batch_runC | Execute or resume a checkpointed structured batch (with microbatching, partial recovery, and circuit breakers) across 'auto' (default), 'codebuddy', or 'zcode'. |
| swarm_batch_statusB | Read the current manifest, item statuses, aggregated token/credit usage, and any blocker for a batchId. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 42 tools
Two large families duplicate each other almost one-for-one: zcode_run/swarm_run, zcode_wait/swarm_wait, zcode_result/swarm_result, zcode_status/swarm_status, zcode_list/swarm_list, zcode_cancel/swarm_cancel, zcode_followup/swarm_followup, zcode_quota/swarm_quota, plus zcode_run_structured vs swarm_run_structured and zcode_structured_result vs swarm_structured_result. There are also three blocking 'wait' tools (hub_wait, zcode_wait, swarm_wait) and multiple progress-inspection paths (hub_log, hub_show, zcode_status, zcode_progress) whose boundaries an agent must infer from dense prose. Descriptions do try to draw lines (e.g. swarm_run subsumes zcode as a backend), but the overlap is severe enough to cause frequent misselection.
Within each prefix the verb_noun pattern holds (hub_post/hub_board/hub_show, zcode_run/zcode_wait/zcode_result, swarm_run/swarm_status), and prefixes are used consistently as namespace markers. However, the namespaces themselves are not parallel: the same operations exist under both zcode_* and swarm_*, and one tool (codebuddy_usage) is named after a backend while the equivalent exists as swarm_quota, so the scheme doesn't tell an agent which prefix to reach for.
42 tools for what is essentially task delegation, monitoring, structured/batch runs, a dispatch hub, and session log reading. Roughly fifteen of those are near-aliases of others, so the count is inflated well beyond the real surface area. The hub_* group is reasonably scoped on its own, but the overall set is too large for the domain.
The lifecycle is well covered: submit (swarm_run/zcode_run/hub_post), observe (status/board/log/progress), block (wait), collect (result/structured_result), continue (followup/hub_answer/hub_tell), stop (cancel), recover (requeue/batch status), and cost (quota/usage) all exist, plus session-log forensics. Gaps are minor, e.g. there is no operation to archive/delete a hub task or to enumerate the worker roster directly (hub_assign only points at it).