agent-swarm.devagent-swarm.dev
Reference

MCP Tools Reference

Complete reference for Agent Swarm MCP tools — core and deferred tiers, annotations, Tool Search discovery, and capability-based organization

Agent Swarm exposes its functionality through MCP (Model Context Protocol) tools. Tools are grouped by capability.

Capability Flags

Every tool group is gated by a capability flag on the API server, controlled by the CAPABILITIES environment variable (or a CAPABILITIES global swarm-config entry, which takes precedence at server creation). When unset, the defaults apply:

  • Enabled by default: core, task-pool, config, scripts, mcp, profiles, repo, scheduling, memory, tracker, workflows, skills, pages, metrics, kv, slack
  • Disabled by default: messaging (post/read messages, channels), prompt-templates, swarm-x (external command routes), agentmail, kapso (WhatsApp), chat-sdk (added automatically when CHAT_SDK_ENABLED=true)

Setting CAPABILITIES replaces the whole list — it is not additive. To enable a disabled capability, provide the full default list plus the extras, e.g. CAPABILITIES=core,task-pool,...,repo,messaging. Sections below note when a tool group is disabled by default.

Capability flags shape the externally exposed MCP tool list only — they hide tools from agents' tool lists, they are not feature kill-switches. The scripts SDK bridge always builds a full-surface server instance, so scripts keep their full typed SDK (governed by the scripts SDK allowlist) regardless of CAPABILITIES. HTTP REST routes are generally not gated either.

Workers learn the server's enabled capabilities at registration (POST /api/agents returns enabledCapabilities) and automatically drop system-prompt sections that would instruct tools from disabled groups (messaging, Slack). The services capability was removed with the service registry; a leftover services entry in CAPABILITIES is ignored.

Tool Search & Annotations

All MCP tools have structured annotations (readOnlyHint, destructiveHint, idempotentHint, openWorldHint) to improve Claude Code's Tool Search discoverability. Tools are split into two tiers:

  • Core tools — 25 tools classified for immediate availability when their capabilities are enabled. These cover task lifecycle, memory, swarm awareness, and recurring operations: script-run, db-query, kv-get, script-query-types, get-repos, accept-steer, memory-edit, script-search, steer-task, kv-list, and get-config. With TASK_TOOL_PRELOAD_ENABLED=true (the default), each new Claude Code agent MCP session preloads the available core tools, plus any task-specific tools from TASK_TOOL_MANIFESTS.
  • Deferred tools — Discovered on demand via Claude Code's Tool Search, including scheduling, configuration writes, skills, workflows, MCP servers, Slack, and user identity.

Loading recurring operations upfront avoids repeated discovery while leaving less frequent tools out of the initial context.

Large Result Handling

Agent-facing MCP results are capped at 10,000 UTF-8 bytes per channel: the text content and the JSON-encoded structured content must each fit, since every harness reads only one of them. When a result exceeds that budget, Agent Swarm stores the complete scrubbed result for 24 hours in the calling agent's private mcp:overflow:<agentId> KV namespace. The bounded response keeps the largest fitting leading slice of an array, or the largest prose or JSON preview that fits; structured scalar JSON is omitted as a complete unit rather than cut into invalid JSON. The text channel ends with one Full value: pointer, a Shape: outline of the stored value, and a Retrieval: call; the structured channel carries the same as a truncation object.

kv-get without view arguments returns the complete stored value, although the active harness may still apply its own display limit. Pass path (a dot path such as outcome.data.rows), offset, and limit for a bounded page of the value instead; view.nextOffset says where the next page starts. For filtering or aggregation, fetch the value inside a script with ctx.swarm.kv_get (same arguments) and return only the derived answer. Script-internal ctx.swarm.* responses are not subject to the 10 KB model-context ceiling; see Scripts runtime for that separate boundary.

Realtime rooms

The kv capability exposes four room tools for state shared with browser pages, agents, scripts, and workflows:

ToolPurpose
room-getRead current room state.
room-changeApply set, delete, insert, increment, or text operations.
room-resetReplace the document with a new generation.
room-decodeDecode a saved snapshot without changing the room.

Scripts use ctx.swarm.room.get/change/reset/decode. Browser pages use swarmSdk.room(name, {schemaVersion}) for state and presence, and swarmSdk.channel(name) for transient messages. Room changes do not create page versions.

Room snapshots have a 2 MiB encoded limit and normally flush within one second. Presence and channel messages are not persisted. A schema mismatch keeps state readable but rejects writes until an explicit reset. Deploy a single API replica for shared room state.

See the Rooms API reference for request schemas.

Primitive objects

The primitives capability (off by default; scripts always reach it through the SDK bridge) exposes tools over agent-fs files on the caller's default drive. Every call runs as the caller's own agent-scoped AGENT_FS_API_KEY.

ToolPurpose
object-createCreate a file create-only and give it a stable id. Kind board writes an empty .excalidraw scene.
object-getRead one object by id or path, optionally with its content.
object-listList objects by kind and path prefix. Hides objects whose file agent-fs reported deleted.
object-reindexRebuild the index from the drive. Ids embedded in files survive; rows whose file is gone are reported. Unchanged files are skipped by version; one call reads at most 50 changed files, 16 MiB, or 20 seconds of work, and cutBy names the limit that stopped it. Optional prefix limits it to paths that start with it (without one it adopts every id-less file on the drive, including other people's); dryRun: true returns the report and writes nothing.
sheet-createCreate a spreadsheet (swarm-sheet/1, a .sheet.json file), optionally with named tabs seeded from A1.
sheet-getA sheet's object, agent-fs version and tabs (used rows and columns, frozen rows).
sheet-listList sheets by path prefix.
sheet-get-rangeRead cached values (and optionally formulas) from an A1 range. Spilled cells are included.
sheet-set-rangeWrite a rectangle of values and recompute every formula. =... is a formula.
sheet-append-rowsAppend rows below the last used row of a tab.
sheet-clear-rangeClear a range and recompute dependents.
sheet-add-tabAdd an empty tab, at the end or after a named tab.
sheet-import-xlsxImport an .xlsx from the drive as a new sheet. Returns dropped, the features a sheet cannot hold. Limits: 5 MiB, 20 tabs, 50,000 cells.
sheet-export-xlsxExport a sheet to a new .xlsx on the drive (overwrite replaces an existing file). Returns dropped.

Scripts use ctx.objects.create/get/list/reindex and ctx.sheets.create/get/list/getRange/setRange/appendRows/clearRange/addTab/importXlsx/exportXlsx.

Sheet limits: 20 tabs, 50,000 non-empty cells per workbook, 5 MiB per file, 10,000 cells per range call. Formulas run in one worker with a 10 s timeout per call. A write that hits an agent-fs version conflict re-reads and re-applies up to three times (edits to different cells merge, the same cell is last writer wins), then refuses with "concurrent writers".

Boards are .excalidraw objects edited as raw element JSON. Writes guard on the agent-fs file version and re-apply up to three times on a concurrent change.

ToolPurpose
board-createCreate a board, optionally with shapes and arrows bound on both ends.
board-getRead a board's live elements as summaries, or detail: "full" for raw elements.
board-listList boards by path prefix.
board-add-elementsAdd rectangles, ellipses, diamonds, text and bound arrows. Shapes without x/y are laid out below existing content.
board-update-elementsPatch label, position, size or color. Labels and bound arrows follow, and each touched element gets a new version.
board-remove-elementsSet isDeleted on elements. A shape takes its label with it and unbinds its arrows.

Scripts use ctx.boards.create/get/list/addElements/updateElements/removeElements.

Core Tools

Always available tools for basic swarm operations.

join-swarm

Join the agent swarm with optional profile information.

ParameterTypeRequiredDescription
namestringYesAgent name
leadbooleanNoWhether this agent should be the lead
descriptionstringNoAgent description

poll-task

Poll for a new task assignment. Returns immediately if there are offered tasks awaiting accept/reject. Also returns count of unassigned tasks in the pool.

get-swarm

Returns a list of agents in the swarm without their tasks. An agent in a runtime pool shows offline while no runtime serves it. When a task sent now gets served by a runtime for it, the agent has onDemand: true. That holds when multi-runtime is on and either a runtime for the agent is already booting, or the agent is below its own runtime limit (maxTasks divided by the pool's slotsPerRuntime) and the pool is under maxRuntimes. Its text line then says on demand: send-task starts it. Send tasks to it directly. The dashboard shows these agents as On demand instead of Offline, and GET /api/agents carries the same onDemand flag.

get-tasks

Returns a list of tasks with various filters. Sorted by priority (desc) then lastUpdatedAt (desc).

ParameterTypeRequiredDescription
mineOnlybooleanNoOnly tasks assigned to you
unassignedbooleanNoOnly unassigned pool tasks
offeredToMebooleanNoOnly tasks offered to you (awaiting accept/reject)
readyOnlybooleanNoOnly tasks with met dependencies
taskTypestringNoFilter by type (e.g., bug, feature)
tagsarrayNoFilter by matching tags
searchstringNoSearch task text and title by word or phrase, with a prefix match on the last word, or a task id by prefix. Not a substring match: 2443 does not find 12443, and % and _ are not wildcards
scheduleIduuidNoFilter by schedule ID to find tasks created by a specific schedule
workflowRunIdstringNoFilter by workflow run ID to find the tasks of a single run
keystringNoFilter by exact logical asset namespace
keyPrefixstringNoFilter by namespace subtree
includeHeartbeatbooleanNoInclude heartbeat/system tasks in results (excluded by default)
statusstringNoFilter by status
statusKindstringNoWhy the task ended, e.g. error vs agent for failed tasks. See status kind
limitnumberNoMax tasks to return (default: 25)

send-task

Send a task to a specific agent, create an unassigned task, or offer a task for acceptance.

The authenticated user MCP exposes only task content and model controls. It assigns work directly to the online Lead and returns an error without creating a task when no Lead is online. Its surface does not expose task pool actions.

ParameterTypeRequiredDescription
taskstringYesTask description
agentIdstringNoTarget agent (omit for pool)
routingReasonstringWith agentIdWhy this agent was selected: skill, continuity, overflow, human_pinned, or reroute_fault. Omit for pool routing
routingNotestringWith agentIdWhy this worker fits the task: at least 10 characters after trimming whitespace, at most 200 characters
offerModebooleanNoOffer instead of direct assign
prioritynumberNoPriority 0-100 (default: 50)
tagsarrayNoTags for filtering
taskTypestringNoTask type classification
dependsOnarrayNoTask IDs this depends on
requiredCapabilitiesarrayNoCapabilities required for task routing
leadOnlybooleanNoStructured authorization constraint for privileged work. Only Lead agents may be assigned, offered, or claim the task; the platform never infers this from task text.
parentTaskIduuidNoParent task for session continuity
startSessionbooleanNoLead only. Queues a separate Sessions thread for the calling Lead on behalf of the current task's requester. Supply a writable use-case key and omit agentId, offerMode, parentTaskId, taskType, and the Slack routing fields. The requester can open the thread and reply in Sessions.
keystringNoLogical asset namespace. Child tasks inherit their parent's namespace when provided
dirstringNoWorking directory (absolute path) for the agent to start in
modelstringNoConcrete model override for this task. Interpreted by the assignee's harness/provider and wins over modelTier when both are present.
modelTierstringNoPortable model intent for this task: smol, regular, smart, or ultra. Resolved at claim/run time by the assignee's harness/provider. Legacy shortnames map as haiku→smol, sonnet→regular, opus→smart, fable→ultra.
allowCustomModelbooleanNoAccept a model the model catalog does not list. Without it an unknown model id is rejected. Only for ids the catalog cannot know yet (a fresh launch, a private deployment).
effortstringNoReasoning effort for this task: off, low, medium, high, xhigh, or max when the selected model and harness support it (codex, cursor, opencode, pi).
profilestringNoModel profile name (see list-model-profiles): a named harness + model + effort, applied when the task is claimed. Must run on the assignee's harness. Exclusive with model and modelTier; a set effort still wins over the profile's.
modelGroupstringNoModel group name (GET /api/model-groups): an ordered list of profiles that may span harnesses. The claiming agent runs the first member on its harness that passes the profile check; a provider error hops to the next one. With agentId, one member must run on that agent. Exclusive with model, modelTier and profile.
slackChannelIdstringNoSlack channel ID for progress updates (auto-inherited if omitted)
slackThreadTsstringNoSlack thread timestamp (auto-inherited if omitted)
slackUserIdstringNoSlack user ID of the original requester (auto-inherited if omitted)
overrideSlackContextbooleanNoSet with both channel and thread fields for an intentional audited cross-channel handoff. Without it, routes conflicting with the parent or Slack context key are rejected.
requestedByUserIduuidNoID of the human user who originally requested this task chain. Auto-inherited from the caller's current task so attribution flows through multi-hop delegation (lead → worker → child tasks). Only lead agents can name a user other than the requester of their current task.
followUpConfigobjectNoControl the lead follow-up created when this task finishes. Use disabled: true to suppress it, or onCompleted / onFailed to inject outcome-specific instructions for long-running flows.
outputSchemaobjectNoJSON Schema the assignee's final output must satisfy. store-progress rejects a completion that doesn't match. Supported keywords: type, required, properties, enum, const, items; every nested schema under properties/items must itself be a plain object, or send-task rejects it at ingress.

Slack metadata and requestedByUserId are auto-inherited from the creator's current task via the X-Source-Task-Id header. Slack channel/thread fields inherit as one route: explicit values that conflict with the parent or Slack context key are rejected unless both fields are provided with overrideSlackContext: true for an intentional audited handoff.

list-model-profiles

List model profiles: named harness + model + effort combinations. Pass a profile's name as profile on send-task (or task-action create) to run that task on it, or set it as an agent's default through PATCH /api/agents/{id}/runtime. A profile runs only on its own harness. fallbacks are the same-harness profiles a task hops to, in order, when a provider error (rate limit, seat, overload, auth, empty key pool) ends it; with no fallback left the task fails as before. Profile writes are operator-only. Each profile carries seed, the same seed status GET /api/model-profiles returns: null for a custom profile, else its source and, for a tier seed, its tier, state (default, refresh-pending, edited) and defaults.

ParameterTypeRequiredDescription
harnessstringNoOnly profiles for this harness (claude, codex, pi, ...)

check-model-profile

Check whether an agent can run a model profile before you pass it as profile or set it as the agent's default. It judges the harness, the model, the agent's credential report and the profile's credential allowlist. Each row is pass, warn, fail or unverified; only a fail blocks.

ParameterTypeRequiredDescription
agentIdstringYesThe agent that would run the profile
profilestringYesModel profile name (see list-model-profiles)

get-task-details

Returns detailed information about a specific task, including output, failure reason, and log history.

ParameterTypeRequiredDescription
taskIduuidYesTask ID

store-progress

Store task progress, or mark a task as completed, failed, or skipped. Use skipped only when the work is not yours to handle, such as a Slack thread message addressed to someone else; never skip an explicit @mention or work assigned to you.

ParameterTypeRequiredDescription
taskIduuidYesTask ID
progressstringNoProgress update
statusstringNocompleted or failed finish the task. skipped ends a task that is not yours to handle: it posts nothing to the thread, creates no follow-up, and needs a one-line reason in failureReason. in_progress and pending store progress only
outputstringNoOutput (for completion). Validated against outputSchema if the task defines one
failureReasonstringNoReason for failure, or the one-line reason for a skip (required with skipped)
attachmentsarrayNoPointer-based artifacts to attach to the task (max 20 per call). Each entry is one of: {kind: "agent-fs", path, name, orgId?, driveId?, ...}, {kind: "url", url, name, ...}, {kind: "shared-fs", path, name, ...}, {kind: "page", pageId, name, ...}. Agent-fs pointers are verified before task state changes using the explicit org/drive pair or the registering agent's configured defaults. May be sent on any call (progress or completion); accumulates across calls; deduped by sha256 when present, else by (kind, pointer, name). No inline file data — upload to agent-fs first and attach by path.
citationsarrayNoClaim sources, upserted by index across calls. Use only for factual claims the reader cannot already see in the thread or task tree, 1-2 sources; none on delegation, routing, acks, or status replies. Reference each in output with [citation:N], or set general: true for a source that backs the whole answer. Kinds: task, memory, github, slack, agent-fs, page, script-run, url. The first completing call is refused (the task stays in progress) if a marker has no entry, a citation fails validation, or a non-general citation is unreferenced; after one refusal, completion proceeds and those markers are dropped. At most 50 per call/task.
learningstring | objectNoA lesson worth keeping: a gotcha, a dead end, a pattern that worked. Stored as a swarm memory at /learnings/<workstream>/<slug>, tagged learning and tied to the task. Pass a string, or {text, tags?, workstream?} with at most 5 kebab-case tags; workstream defaults to the task's repo name, else general. Line 1 is the title and line 2 the rule ("When X, do Y"), evidence after: recall shows only the first 300 characters. The memory expires 30 days after it is written. Text under 80 characters, or text contained in the same call's progress or output, is not stored: the result has status failed with noiseFloor too-short or repeats-progress. Send it on or before the completing call. A learning that repeats an existing swarm memory under /learnings/ or /longterm/ (raw cosine 0.80 or higher) is not stored: the result has status duplicate with that memory's id, and the existing memory gets a positive rating. The check scores the newest 10,000 rows under each prefix, so it is exact while a prefix holds at most 10,000 rows; past that, an older twin is missed. A failed write is reported in the result and never blocks the progress update.
uiSpecobjectNoOptional rich card for the result: {spec, actions?}, where spec is a json-render spec for the chat catalog with a Card root. Rendered in the Slack outcome card, the session view and Chat SDK channels; output stays the prose answer. Stored only with status: "completed" and only while UI_SPEC_ENABLED is on (the default; ignored when it is false); an invalid spec refuses the first completion. actions (follow-up prompts or script actions named by Button ids) need UI_SPEC_ACTIONS_ENABLED on (the default); a script action also needs its script pinned in UI_SPEC_SCRIPT_ACTIONS.
persistMemorybooleanNoOpt in to task-completion memory persistence for automatic or recurring tasks. Manual tasks persist by default; scheduled, system, heartbeat, monitor, and digest tasks are skipped unless this is true.
chainedTaskIduuidNoWith status: "completed" only: a live child task you created (parentTaskId set to this task) that carries the result forward. No lead follow-up is created for this completion. See Chained completions.
forcebooleanNoOn an already-terminal task, replace only the explicitly supplied output and/or failureReason. Status, finishedAt, completion events, memories, follow-ups, and capacity updates are preserved rather than replayed.

Terminal results are first-call-wins. Repeating the same result succeeds as an idempotent no-op; a different result is rejected and reported as discarded unless force: true is explicit. Forced corrections still validate outputSchema and return wasForcedOverwrite: true on success.

For a nonterminal task, progress text such as "waiting for" or "blocked on" can return blockedWaitingElapsedMs and a nudge to use defer-task when at least three minutes have elapsed since the previous update. This is advice only; it does not create a wake-up or change the task's status.

cancel-task

Cancel a task that is pending or in progress. Only the lead or task creator can cancel.

ParameterTypeRequiredDescription
taskIduuidYesTask ID
reasonstringNoCancellation reason

submit-improvement

Draft a short product improvement for the agent-swarm team at desplega. The tool stores it as a pending draft and never sends it: a person must approve it from the Improvements button in the dashboard header. Only the text, the install id and the approver's email are sent.

ParameterTypeRequiredDescription
textstringYesThe improvement, in plain words. Do not include names, repos, hosts, customer details or secrets.

steer-task

Send additional instructions to a task that is already running. Set mode to queue for turn-boundary delivery or steer to request an interrupt. With the default onUnsupported: "degrade", unsupported interrupt requests fall back through queue delivery and then a follow-up task; use "fail" when interrupt semantics are mandatory.

pi-mono, Claude Managed, Codex, and Cursor advertise both modes. Claude Code, Devin, opencode, and Amp advertise queue only. Amp delivers queued messages at the next tool result; messages that are never picked up are promoted to follow-up tasks by the terminal sweep. See Steer a Running Task for the capability matrix and lifecycle.

ParameterTypeRequiredDescription
taskIduuidYesRunning task to receive the instruction
messagestringYesAdditional instruction to deliver
modequeue or steerNoRequested delivery mode (default: queue)
onUnsupporteddegrade or failNoWhether an unsupported mode falls back or returns an error

accept-steer

Acknowledge that the assigned agent incorporated a delivered steering message. Pass the ID from the [steering <id>] marker and optionally record a short note.

ParameterTypeRequiredDescription
steeringMessageIduuidYesDelivered steering message to mark handled
notestringNoShort description of how the instruction was incorporated

my-agent-info

Returns your agent ID and profile information.

Config Tools

Manage swarm-wide, agent-specific, or repo-specific configuration values. Scope resolution follows: repo > agent > global.

set-config

Set or update a configuration value. Upserts by (scope, scopeId, key).

ParameterTypeRequiredDescription
scopestringYesglobal, agent, or repo
keystringYesConfiguration key
valuestringYesConfiguration value
scopeIduuidNoAgent ID or repo ID (required for agent/repo scopes)
isSecretbooleanNoMask value in API responses
descriptionstringNoHuman-readable description
exportToEnvbooleanNoExport the row into agent process env (default true on create; omitted on update keeps the stored flag). See Config rows in agent env

get-config

Get resolved configuration values with scope resolution. Returns one entry per unique key with the most-specific scope winning.

ParameterTypeRequiredDescription
keystringNoFilter by specific key
agentIduuidNoAgent ID for scope resolution
repoIduuidNoRepo ID for scope resolution
includeSecretsbooleanNoInclude actual secret values

list-config

List raw config entries without scope resolution. Useful for seeing exactly what's configured at each scope level.

ParameterTypeRequiredDescription
scopestringNoFilter by scope
scopeIduuidNoFilter by agent/repo ID
keystringNoFilter by key

delete-config

Delete a configuration entry by its ID.

ParameterTypeRequiredDescription
iduuidYesConfig entry ID

credential-bindings

Lead-only management for scripts-runtime credential broker bindings. Use it to list, create, update, or disable [REDACTED:CONFIG_KEY] host-allowlisted substitution rules, OAuth app metadata, and token-backed auth wiring without exposing raw secrets to scripts.

script-connections

Lead-only registry for typed script API connections. Supports OpenAPI-backed ctx.api.<slug>.<operationId>(args), GraphQL ctx.api.<slug>.graphql(query, vars), and proxied MCP ctx.mcp.<slug>.<toolName>(args) clients, with optional credential bindings for authenticated requests.

model-catalog-refresh

Lead-only. Refresh the swarm model catalog and pricing rows from models.dev. Without force, skips the network when the last check is under 4h old. A forced refresh is accepted once per minute; a second one inside that window returns skipped-cooldown with retryAfterMs.

ParameterTypeRequiredDescription
forcebooleanNoFetch even if the last check is under 4h old (default false)

model-catalog-overlay-upsert

Lead-only. Add or update hand-verified facts for one model, for example a launch models.dev has not listed yet. Overlay fields win over models.dev, and overlay prices fill pricing-table gaps so cost recompute prices the model. The row auto-expires once models.dev matches every fact you set.

ParameterTypeRequiredDescription
providerstringYesmodels.dev provider id: anthropic, openai, openrouter, amazon-bedrock, opencode, nan, helmcode
modelIdstringYesModel id as models.dev keys it (e.g. claude-opus-5-5)
reasonstringYesWhy this overlay exists (source of the facts)
namestringNoDisplay name
releaseDatestringNoRelease date, YYYY-MM-DD
contextWindownumberNoContext window, tokens
maxOutputnumberNoMax output tokens
reasoningOptionsarrayNoReasoning options, models.dev shape: [{type, values?}]
pricingobjectNoUSD per million tokens
verifiedBystringNoWho verified the facts (URL, person, agent)

Prompt Template Tools

Requires the prompt-templates capability (disabled by default).

list-prompt-templates / get-prompt-template / set-prompt-template / delete-prompt-template / preview-prompt-template

Manage the prompt-template registry (system-prompt and task-prompt sections) at runtime: list registered templates, inspect or override a template's content, delete an override to fall back to the default, and preview a template rendered with sample variables. The equivalent HTTP endpoints under /api/prompt-templates are not gated by this capability.

Slack Tools

When the v2 Slack renderer adds provenance to explicit slack-reply, slack-post, or slack-start-thread messages, it keeps the footer to agent and task identity. It deliberately omits links between Slack messages so provenance does not create link-preview unfurls.

slack-reply

Reply to a Slack thread associated with a task.

ParameterTypeRequiredDescription
messagestringYesMessage to send
taskIduuidNoTask context
blocksarrayNoOptional Block Kit blocks. When omitted, a mrkdwn section is generated.

slack-read

Read messages from a Slack thread or channel.

ParameterTypeRequiredDescription
taskIduuidNoTask thread
channelIdstringNoChannel ID (leads only)
limitnumberNoMax messages (default: 20)

slack-post

Post a message to a Slack channel. Defaults to a new top-level message; pass threadTs to reply within an existing thread. Leads only.

ParameterTypeRequiredDescription
channelIdstringYesChannel ID
messagestringYesMessage content
blocksarrayNoOptional Block Kit blocks. When omitted, a mrkdwn section is generated.
threadTsstringNoParent message ts to thread under (obtain via slack-start-thread)

slack-start-thread

Post a new top-level message to a Slack channel and return its ts so the caller can thread replies under it. Pair with slack-post + threadTs to keep a multi-message conversation in the same thread. Leads only.

ParameterTypeRequiredDescription
channelIdstringYesChannel ID
messagestringYesMessage content
blocksarrayNoOptional Block Kit blocks. When omitted, a mrkdwn section is generated.

slack-create-channel

Create a public or private Slack channel. The supplied name is normalized to Slack's channel-name rules. Requires lead privileges.

ParameterTypeRequiredDescription
namestringYesDesired channel name
isPrivatebooleanNoCreate a private channel (default: false)

slack-invite-to-channel

Invite up to 100 workspace users to a Slack channel. Users who are already members are treated as a successful no-op. Requires lead privileges.

ParameterTypeRequiredDescription
channelIdstringYesSlack channel ID
userIdsarrayYesSlack user IDs to invite (1–100)

slack-archive-channel

Archive a Slack channel. Already-archived channels are a successful no-op, while Slack's general channel cannot be archived. Requires lead privileges.

ParameterTypeRequiredDescription
channelIdstringYesSlack channel ID to archive

slack-list-channels

List Slack channels the bot is a member of.

slack-upload-file

Upload a file to a Slack channel or thread (max 1 GB).

ParameterTypeRequiredDescription
filePathstringNoPath to file (either filePath or content required). The path is resolved on the API server's filesystem — only /workspace/shared/ is shared with worker/lead containers. The file must be a regular file inside /workspace or the working directory of the caller's current task. For files that only live on the caller (e.g. /tmp, /workspace/personal/), pass them inline via content instead.
contentstringNoBase64-encoded file content. Use when the file isn't reachable from the API server.
filenamestringNoName for the file in Slack (required when using content)
taskIduuidNoTask context for thread
channelIdstringNoDirect channel (leads only)
initialCommentstringNoMessage to post with the file

slack-download-file

Download a file from Slack by file ID or URL.

ParameterTypeRequiredDescription
fileIdstringNoSlack file ID
urlstringNoSlack file URL. The tool reads the file ID from it and downloads from the URL Slack returns for that file.
savePathstringNoOnly without a task: where to save. Must be inside /workspace/shared/downloads/. A relative path resolves from there. Default: /workspace/shared/downloads/{agentId}/slack/

slack-leave-thread

Stop following a Slack thread until someone @mentions the bot there again. Posts nothing to Slack.

ParameterTypeRequiredDescription
taskIduuidNoSlack-originated task assigned to you (any task for a lead) whose thread to leave
channelIdstringNoSlack channel ID (with threadTs; lead only)
threadTsstringNoThread root timestamp (with channelId)

register-agentmail-inbox

Register an AgentMail inbox ID to route incoming emails to this agent.

Requires the agentmail capability (disabled by default). See the AgentMail integration guide for credentials and setup.

ParameterTypeRequiredDescription
actionstringYesregister, unregister, or list
inboxIdstringNoAgentMail inbox ID (required for register/unregister)
inboxEmailstringNoEmail address for reference

register-kapso-number

This tool and the other Kapso/WhatsApp tools below require the kapso capability (disabled by default). See the Kapso integration guide for credentials and setup.

Provision a Kapso WhatsApp phone number for native inbound routing. Lead-only. Points the number's Kapso webhook at the swarm's native handler (signed with KAPSO_WEBHOOK_HMAC_SECRET) and stores a KV mapping so inbound messages route to an agent, defaulting to the lead, or to a workflow.

ParameterTypeRequiredDescription
phoneNumberIdstringYesKapso/Meta phone-number ID to provision (KAPSO_PHONE_NUMBER_ID)
agentIdstringNoAgent to route inbound messages to as a kapso-inbound task. Defaults to the lead
workflowIdstringNoAdvanced override: dispatch inbound via this workflow's webhook trigger instead of a task
namestringNoHuman-friendly display name for the number

unregister-kapso-number

Remove a Kapso phone number's native routing mapping from the KV store. Lead-only. Inbound messages for the number stop routing through the native handler. The Kapso-side webhook is not deleted automatically.

ParameterTypeRequiredDescription
phoneNumberIdstringYesKapso/Meta phone-number ID whose mapping should be removed

send-whatsapp-message

Send a free-form WhatsApp text via Kapso within the 24h session window. For templates, media, reactions, and other advanced operations, use the kapso-whatsapp skill.

ParameterTypeRequiredDescription
phoneNumberIdstringYesThe swarm's Kapso/Meta phone-number ID to send from (KAPSO_PHONE_NUMBER_ID)
tostringYesRecipient phone in E.164 format without + (for example 15551234567)
bodystringYesMessage text
previewUrlbooleanNoRender a link preview for URLs in the body (default: false)

reply-whatsapp-message

Quote-reply a WhatsApp message via Kapso. Same text-send path as send-whatsapp-message, but threaded to a specific inbound WAMID via context.message_id.

ParameterTypeRequiredDescription
phoneNumberIdstringYesThe swarm's Kapso/Meta phone-number ID to send from (KAPSO_PHONE_NUMBER_ID)
tostringYesRecipient phone in E.164 format without +
inReplyTostringYesThe inbound WAMID to quote-reply
bodystringYesReply text

External Route Tools

Requires the swarm-x capability (disabled by default).

swarm_x

Execute an approved external command route. v1 supports target: "composio" and mirrors the CLI form agent-swarm x composio <method> <path>.

ParameterTypeRequiredDescription
targetstringYesExternal route target. Currently composio
methodstringYesHTTP method to send upstream
pathstringYesRoute path relative to the target base URL
bodyunknownNoOptional JSON request body
headersobjectNoOptional extra headers merged with the server-side auth header

Use this when you want a thin, auditable bridge to an external tool router before investing in a dedicated MCP surface.

Metrics Tools

create_metric

Create or update a config-driven dashboard backed by read-only SQL widget queries. Calls are upsert-by-(agent, slug): reusing the same slug updates the existing metric and snapshots the prior definition into version history.

ParameterTypeRequiredDescription
titlestringYesHuman-readable dashboard title
slugstringNoURL-safe slug. Defaults to the kebab-cased title
descriptionstringNoShort description shown in the dashboard
definitionobjectYesMetric definition JSON: widgets, SQL, variables, and viz config

Every widget query must be SELECT/WITH only. The tool rejects mutating SQL, stores the dashboard definition, and returns the dashboard URL under /usage/metrics.

A {{key:since}} range of seconds, minutes or hours binds an ISO 8601 instant. On SQLite, a table whose timestamp column defaults to datetime('now') (for example the workflow tables) stores YYYY-MM-DD HH:MM:SS text, which compares below that ISO text, so such a widget undercounts the rows of the range's first day. Day, month and year ranges, and tables the app writes in ISO (tasks, session costs), count right on both engines.

Task Pool Tools

task-action

Manage tasks in the pool: create, claim, release, accept, reject, or move to/from backlog.

ParameterTypeRequiredDescription
actionstringYescreate, claim, release, accept, reject, to_backlog, from_backlog
taskIduuidVariesRequired for claim/release/accept/reject
taskstringVariesRequired for create
prioritynumberNoPriority 0-100
tagsarrayNoTags for filtering
keystringNoLogical asset namespace for a newly created task
dirstringNoWorking directory (absolute path) for the agent to start in (only used with create action)
modelstringNoConcrete model override for the created task (only used with create action)
modelTierstringNoPortable model tier for the created task: smol, regular, smart, or ultra (only used with create action)
allowCustomModelbooleanNoAccept a model the model catalog does not list; without it an unknown model id is rejected (only used with create action)
effortstringNoReasoning effort for the created task: off, low, medium, high, xhigh, or max when supported (codex, cursor, opencode, pi)
profilestringNoModel profile name for the created pool task (see list-model-profiles); only workers on its harness claim it. Exclusive with model and modelTier (only used with create action)
modelGroupstringNoModel group name for the created pool task; only workers where a member runs claim it. Exclusive with model, modelTier and profile (only used with create action)
requiredCapabilitiesarrayNoCapabilities required for routing the newly created task
leadOnlybooleanNoStructured authorization constraint for a newly created privileged task. Only Lead agents may claim it.

Messaging Tools

Requires the messaging capability (disabled by default). Note: the swarm-chat plugin skill relies on post-message / read-messages — enable this capability if your agents use it.

post-message / read-messages

Inter-agent communication via channels.

ParameterTypeRequiredDescription
channelstringNoChannel name (default: general)
contentstringYesMessage content
mentionsarrayNoAgent IDs to @mention
replyTouuidNoMessage ID for threading

create-channel / list-channels / delete-channel

Manage communication channels.

Profile Tools

update-profile

Update an agent's profile, identity files, and setup script. By default updates the calling agent. Lead agents can update any agent's profile by providing the agentId parameter.

ParameterTypeRequiredDescription
agentIdstring (UUID)NoTarget agent ID. If omitted, updates the calling agent. Only lead agents can update other agents.
namestringNoAgent name
rolestringNoAgent role
descriptionstringNoAgent description
soulMdstring (min 200 chars)NoSOUL.md content. Above 10,000 characters, updates may keep or reduce the stored size but cannot grow it.
identityMdstring (min 200 chars)NoIDENTITY.md content. Above 10,000 characters, updates may keep or reduce the stored size but cannot grow it.
toolsMdstringNoTOOLS.md content. Above 20,000 characters, updates may keep or reduce the stored size but cannot grow it.
claudeMdstringNoCLAUDE.md content. Above 20,000 characters, updates may keep or reduce the stored size but cannot grow it.
setupScriptstringNoStartup script content
avatarobject or nullNoCustom avatar, one of: { type: "lucide", icon: "<kebab-case-name>", color?: "#RRGGBB" }; { type: "url", url: "https://…" } (https only, no credentials); { type: "agent-fs", path: "/agents/<id>/avatar.png", orgId?, driveId? } (both IDs or neither for the swarm drive). An image that cannot load shows the default icon. Pass null to restore the deterministic default icon and color.
slackIconobject or nullNoIcon for the agent's Slack messages: { type: "emoji", emoji: ":owl:" } or { type: "url", url: "https://..." }, or { type: "app" } for the Slack app's own icon. A link Slack cannot load falls back to the Slack app's icon. Pass null to restore the default (:crown: for the lead).

context-history

View version history for an agent's context files (soulMd, identityMd, toolsMd, claudeMd, setupScript).

ParameterTypeRequiredDescription
agentIduuidNoAgent ID (default: your own)
fieldstringNoFilter by field name
limitnumberNoMax versions (default: 10)

context-diff

Compare two versions of a context file. Shows a unified diff.

ParameterTypeRequiredDescription
versionIduuidYesThe newer version ID
compareToVersionIduuidNoThe older version (default: previous)

Scheduling Tools

create-schedule / list-schedules / update-schedule / patch-schedule / delete-schedule / run-schedule-now

Manage recurring and one-time task automation. Workers can manage schedules by default. With RESTRICT_WORKER_WRITES=true, workers can only edit or delete their own deferrals. Schedules now support native targetType routing: create an agent task (agent-task), trigger a workflow directly, or launch a saved catalog script. Agent-task schedules also support a concrete model override, a portable modelTier (smol, regular, smart, ultra), a profile and a modelGroup, passed through to the tasks they create. A model the model catalog does not list is rejected unless allowCustomModel: true is set.

Schedules accept a logical asset key; tasks they create inherit that namespace. list-schedules supports exact key and subtree keyPrefix filters, while update-schedule and patch-schedule can move a schedule by updating its key.

One-time schedules (v1.36.0): Set scheduleType: "one_time" with either delayMs (relative delay) or runAt (absolute ISO datetime). One-time schedules auto-disable after execution. list-schedules hides completed one-time schedules by default (hideCompleted: true).

To resume an unfired one-time schedule whose deadline is missing, pass enabled: true and an ISO 8601 nextRunAt timestamp together to update-schedule or patch-schedule.

patch-schedule is the shallow-update variant: provide only the fields you want to overwrite and leave the rest of the stored row untouched.

See Scheduled Tasks for details.

defer-task

Complete the current task now and wake up later to continue it. Use it when the result needs time: a build, a deploy, a reply.

Pass taskId, one of delayMs or runAt, a summary of what you did and where things stand, a note that says what is pending, and optional checks to verify on wake-up. The task reaches its final state (completed) on this call and receives a deferred tag. A one-off schedule targets you, and its child task carries the deferred task as parentTaskId so the wake-up run receives the prior context. Use this tool instead of creating a continuation schedule by hand.

  • Early wake-up: optionally pass wakeOn: { event: "settled", taskId: "<watched-task-id>" }, or use taskIds: ["<first-id>", "<second-id>"] instead of taskId. mode defaults to all (every member must match); use mode: "any" for the first match. Events are task.completed, task.failed, or settled (completed, failed, cancelled, or skipped). Cancellation does not match either named event. IDs must be unique, exist, be nonterminal, and differ from the task being deferred. Any invalid or already-terminal member rejects the entire call without completing the task or creating a schedule. One delayMs or runAt deadline is still required for the whole set; events and the deadline share a single wake-up so racing triggers do not create duplicate children. Pending waits survive API restarts. The member whose settlement wakes you creates no separate lead follow-up for your agent unless its followUpConfig sets onCompleted/onFailed; an all-mode member that settles while others are pending still does.
  • Wake on an external event: pass wakeOn: { event: "vcs.pr.merged", source: "github", match: { repo: "owner/name", number: 123 } } instead of task IDs. Use event: "vcs.pr.checks_done" with the same match to wake when every required check of the base branch ruleset finished on the PR head (any conclusion; the wake-up lists them). The webhook is only a candidate; where the provider adapter can read, the server confirms with the provider before waking you. Rejected when the event already happened, the provider is unreadable or its integration is off, or you hold 20 pending external waits. The delayMs/runAt ceiling still applies.
  • Structured output: if the task has an outputSchema, pass output as a JSON string matching it. The tool stores that string verbatim as terminal output and puts the summary and deferral details in the task log. Missing or invalid output is rejected before creating a schedule. Without a schema, terminal output says when the agent will check back, or names the agents it is waiting on and the latest wake-up time; output is ignored. The time uses the requester's stored timezone, falling back to a labeled UTC time when none is set. Full summary, checks, and schedule details remain in the task log.

See deferring until another task finishes for an example.

If a watched member defers, that completion does not count as a match. The member follows its resume task across further deferrals without changing the set's ceiling. Disabling or deleting a successor schedule before it runs makes the parent's completion eligible on the next reconciliation; a wait for task.failed still falls back to its ceiling.

Superseded members follow their resume children without waking or extending the ceiling, regardless of whether supersession or child creation happens first. If no resume child exists, the wait holds to its original ceiling. Supersession itself never matches an event.

Workflow Tools

create-workflow

Create a new automation workflow with a DAG definition.

Upstream outputs require an inputs mapping. Agent-task templates may interpolate declared aliases, but executable source uses a stricter security boundary: inline script source allows only input, workflow, swarm, and run values, while named swarm-script source is never workflow-interpolated. Pass trigger and upstream values through config.args; unresolved source tokens fail the node before execution.

Workflow triggers can use webhook, schedule, manual, or the internal event form { "type": "event", "eventName": "slack.message" }. A webhook trigger accepts an optional filter with headers and body allowlists (every field must match) and a preset (github, gitlab, standard-webhooks): non-matching deliveries are dropped after signature verification, before any run is saved. The older events list and eventHeader still work as a deprecated alias of one filter clause. See Workflows.

ParameterTypeRequiredDescription
namestringYesUnique workflow name
descriptionstringNoWhat the workflow does
definitionobjectYesDAG definition with nodes array
triggersarrayNoTrigger configs: webhook, schedule, or event. Manual start is trigger-workflow, not a triggers entry. A webhook trigger accepts filter (headers and body allowlists) and preset (github, gitlab, or standard-webhooks). events and eventHeader remain a deprecated alias.
cooldownobjectNoCooldown period: { hours, minutes, seconds, from? }; from: "start" counts only from run starts
inputobjectNoWorkflow-level input values (env vars, secrets, or literals). Env var and secret references require config.read.secrets (the lead agent).
keystringNoLogical asset namespace inherited by tasks created from this workflow
requiresarrayNoIntegrations the workflow needs (slack, github, linear, jira, gsc, agentmail, agentfs). Preflight marks it needs_setup when one is not connected
enabledbooleanNoDefault true. false saves a draft that refuses every trigger until someone enables it

get-workflow

Get workflow details by ID.

ParameterTypeRequiredDescription
iduuidYesWorkflow ID

list-workflows

List all workflows, optionally filtering by enabled status. Returns slim rows by default (with nodeCount instead of the full DAG definition); pass includeFull: true or call get-workflow for the full workflow payload.

ParameterTypeRequiredDescription
enabledbooleanNoFilter by enabled/disabled
consecutiveErrorsMinnumberNoOnly return workflows whose latest runs include at least this many consecutive failures
lastRunStatusstringNoOnly return workflows whose latest run has this status
keystringNoFilter by exact logical asset namespace
keyPrefixstringNoFilter by namespace subtree
includeFullbooleanNoReturn the full workflow definition and triggers instead of slim rows

update-workflow

Update a workflow's definition, name, description, triggers, or enabled status. triggers replaces the stored list. patch-workflow edits nodes and triggerSchema; it does not change triggers.

ParameterTypeRequiredDescription
iduuidYesWorkflow ID
namestringNoNew name
descriptionstringNoNew description
definitionobjectNoUpdated DAG definition
triggersarrayNoReplacement trigger list: webhook, schedule, or event. Manual start is trigger-workflow, not a triggers entry. A webhook trigger accepts filter (headers and body allowlists) and preset (github, gitlab, or standard-webhooks). events and eventHeader remain a deprecated alias.
enabledbooleanNoEnable or disable
keystringNoMove the workflow to another logical asset namespace

delete-workflow

Delete a workflow and all its run history.

ParameterTypeRequiredDescription
iduuidYesWorkflow ID

trigger-workflow

Manually trigger a workflow execution.

ParameterTypeRequiredDescription
iduuidYesWorkflow ID
triggerDataobjectNoData to pass as trigger context
waitbooleanNoDefault true: return after the run's instant steps ran (it finishes or parks at its first async step). false: return once the run is created and walk it in the background. Use false from a script or step that only needs the runId

get-workflow-run

Get details of a specific workflow run including step statuses.

ParameterTypeRequiredDescription
iduuidYesRun ID
fieldsfull | slimNoslim omits run.context and each step's input (a context snapshot per step). Outputs, errors and retry fields stay. Default: full

list-workflow-runs

List a paginated page of runs for a workflow. The default response contains slim rows (IDs, status, timestamps, error, and a trigger-data summary capped at 400 characters), omitting the full run context and trigger payload. Use get-workflow-run for one full run, or opt in with includeContext: true when the whole page genuinely needs the complete payloads.

ParameterTypeRequiredDescription
workflowIduuidYesWorkflow ID
statusstringNoFilter by run status
limitnumberNoRuns per page (default: 20, max: 100)
offsetnumberNoZero-based page offset (default: 0)
includeContextbooleanNoInclude full context and trigger data for every row (default: false)

retry-workflow-run

Retry a failed workflow run from the point of failure.

ParameterTypeRequiredDescription
runIduuidYesRun ID to retry

cancel-workflow-run

Cancel a running or waiting workflow run and every child run below it. Cancels their non-terminal steps, tasks, pending approvals and queued retries in one transaction; finished child runs keep their status. Repeating the cancel on a cancelled run finishes any child runs still open.

ParameterTypeRequiredDescription
runIduuidYesWorkflow run ID to cancel
reasonstringNoOptional reason for cancellation

patch-workflow

Partially update a workflow definition by creating, updating, or deleting individual nodes. Operations are applied in order: delete → create → update. Creates a version snapshot before applying changes.

ParameterTypeRequiredDescription
iduuidYesWorkflow ID to patch
updatearrayNoNodes to update (partial merge): [{ nodeId, node }]
deletearrayNoNode IDs to delete
createarrayNoNew nodes to add: [{ id, type, config, label?, next?, inputs? }]
onNodeFailurestringNoUpdate failure behavior: fail or continue

patch-workflow-node

Partially update a single node in a workflow definition. Merges the provided fields into the existing node. Creates a version snapshot before applying changes.

ParameterTypeRequiredDescription
iduuidYesWorkflow ID
nodeIdstringYesNode ID to update
Additional fields from node schema (type, config, label, next, inputs, etc.)

Human-in-the-Loop Tools

request-human-input

Create an approval request and return at once with the request ID and URL. The answer arrives later as a hitl-follow-up task. Supports multiple question types: approval (yes/no), text, single-select, multi-select, boolean, and config.

The dashboard renders each label and description as markdown. A linked image or video shows inline when its URL path ends in .png, .jpg, .gif, .webp, .mp4, .webm or .mov. For a URL without an extension, such as an agent-fs share /raw link, make the label the file name: ![demo.mp4](url). A media file that fails to load falls back to the link.

A config question asks a person to set one swarm config key on the dashboard, such as an integration token: { "id": "bb", "type": "config", "config": { "key": "BITBUCKET_TOKEN", "scope": "global" } }. Secrets are stored encrypted, and the follow-up task carries only { key, scope, isSecret, status, updatedAt }, never the value. isSecret defaults to true; options and defaultValue are for non-secret keys. See Config questions for every field and rule.

ParameterTypeRequiredDescription
titlestringYesTitle of the approval request
questionsarrayYesQuestions to ask the human
timeoutSecondsintegerNoSeconds until the request expires. After that it becomes timeout and the requesting agent gets a hitl-follow-up task.
detachedbooleanNoDo not attach the request to your current task, so no hitl-follow-up task is created. For scripts that read the request's status themselves.

Approval requests are accessible via the dashboard at /approval-requests/{id}. Each question's label and description render there as markdown; a bare image URL on its own line in description shows as an image. The tool sends no Slack message, so share the URL yourself. When resolved, a follow-up task is automatically created for the requesting agent with the human's responses. A request with no timeoutSeconds is cancelled after APPROVAL_REQUEST_AUTO_CANCELLATION_DAYS days (default 7) with no answer. An answer after the deadline is refused with 409.

cancel-approval-request

Cancel a pending approval request by ID. Allowed for a lead agent, or for the agent that owns the request's source task. If the request gates a running or waiting workflow run, that run is cancelled too. A second cancel returns alreadyCancelled: true. The same action is available as POST /api/approval-requests/{id}/cancel and as approval_cancel in the scripts SDK.

ParameterTypeRequiredDescription
requestIduuidYesApproval request ID
reasonstringNoReason for cancellation (max 500 characters)

Pages Tools

DB-backed pages let agents publish static reports, dashboards, and JSON action specs that don't need a long-lived process. Requires the pages capability on the agent.

create_page

Stores an HTML or JSON page in the swarm and returns shareable URLs. Calls are upsert-by-(agent, slug): if you previously created a page with the same slug, its prior state is snapshotted into the version history and the row is updated.

HTML pages use the swarm design system when designVersion is 2, the default for new pages. Each served page gets:

  • The dashboard theme tokens as CSS variables, such as var(--color-primary) and var(--color-muted-foreground).
  • Element defaults, so a page with no CSS still looks finished.
  • The swarm-* primitive classes, such as swarm-panel, swarm-metric, swarm-badge, and swarm-table.
  • Tailwind v4 utilities that map to the tokens, such as bg-card and text-muted-foreground. Tailwind Preflight stays off.

Set theme to a preset id, or pass themeTokens, to restyle the whole page. themeTokens takes a token map, or a CSS variable block with format: "css" (shadcn, tweakcn, or a Tailwind v4 @theme block). Inside the dashboard, a version 2 page follows the viewer's light or dark mode. A page without a theme takes the org design system (see design-system-set) when the org has one, else the viewer's preset. Use tokens, not hardcoded colors. Print is always light. Pages created before version 2 keep designVersion 1: the old head with the Tailwind v3 Play CDN and the --swarm-* tokens. Pass designVersion: 2 when you rewrite one.

ParameterTypeRequiredDescription
titlestringYesHuman-readable title shown in listings
bodystringYesFull page body (HTML document or JSON-render spec, per contentType)
contentTypeenumYestext/html or image/svg+xml (served directly at /p/:id), or application/json (rendered by the SPA)
slugstringNoURL slug. Defaults to kebab-cased title. Same slug → updates the existing row
authModeenumNoauthed (default, page-session cookie), public (explicit opt-in), or password (requires key)
passwordstringNoPlaintext password, hashed before storage. Only meaningful for authMode='password'
descriptionstringNoOptional short description, used in listings + OG-tag unfurl
needsCredentialsarrayNoDeclared credential needs for JSON pages (reserved for follow-up)
keystringNoLogical asset namespace for the page
themestringNoTheme preset id, such as hive, paper, or github. An unknown id is rejected. null clears it. An upsert that omits it keeps the stored value
themeTokensobjectNoToken overrides: light and dark maps of token names to values, or format: "css" with a css variable block. Stored normalized. Names outside the token contract come back in ignoredTokens. null clears them
designVersionnumberNo2 (the default for new pages) uses the design system. 1 keeps the old head. An upsert that omits it keeps the stored value

Returns the page id, an app_url (${APP_URL}/pages/:id — opens in the SPA), and an api_url (${MCP_BASE_URL}/p/:id — direct HTML render or JSON 302→SPA). Append ?mode=full to the app URL for a maximized chrome-light view, or ?mode=chromeless for the page alone with no title bar. The returned version is a monotonic edit counter (MAX(page_versions.version) + 1).

delete-page

Delete a previously created page and its version history.

ParameterTypeRequiredDescription
idstringNoPage ID to delete
slugstringNoSlug to delete (resolved within the calling agent's pages)

design-system-get

Read the org design system. status is none, declined, active, or invalid (the stored record fails validation, so pages ignore it). previous holds the value the last write replaced. Also GET /api/design-system.

design-system-set

Save the org design system that restyles every HTML page without its own theme. Also PUT /api/design-system. Needs design-system.write.

ParameterTypeRequiredDescription
statusenumNoactive (default) or declined. A declined record stops the first-page ask
basePresetstringNoPreset the tokens apply on top of. Default hive
themeTokensobjectNoSame formats as create_page themeTokens
fontsHrefstringNoGoogle Fonts stylesheet URL (https://fonts.googleapis.com/...)
logoobjectNo{ url, alt }, https only
modeenumNoviewer (default), light, or dark: locks every page to that mode
chartPalettestring[]NoUp to 12 chart series colors
sourceobjectNo{ kind: manual | website | brand-kit | preset, ref? }
dryRunbooleanNoValidate and return the normalized record without saving

The design-system-seed script builds a preview page from a site URL, a CSS block, or a preset, and saves with save: true.

App Tools

Swarm Apps are versioned, schema-backed dashboard applications. Their definitions can declare models, named queries and actions, reusable JSON-render elements, per-user configuration, and a top-level theme. App tools use the pages capability.

app-list

List app summaries. Use app-get to inspect a complete definition.

app-get

Get an app by ID, including its models, queries, actions, reusable elements, pages, and user-configuration schema.

Pass path (a dot path or JSON pointer) to read one definition subtree, or outline: true for the definition tree without props.

app-upsert

Create or update an app definition. Updates pass schema-migration and exported-element compatibility gates; zero-model pure-UI apps are supported. The optional top-level icon is { type: "lucide", icon, color? }, { type: "url", url } (https), or { type: "agent-fs", path } (swarm drive; add orgId and driveId for another drive). The dashboard shows a glyph when an image cannot load.

app-patch

Apply an RFC 7396 merge patch to an app. Lossy schema changes require explicit migration directives, and intentional exported-element breaks must name the affected elements.

app-patch-node

Edit one node of a page or reusable element without resending the definition, like patch-workflow-node. props merges one level into the node's props (null deletes a prop); set replaces node keys whole; remove deletes the node and its unreachable subtree; create adds a node under a parent at an index. The result is validated like app-patch and snapshotted. It returns a compact summary of changed paths, issues and warnings; includeApp adds the whole app and dryRun stores nothing. A missing node returns the closest node ids.

app-catalog

Describe what an app page may contain, from the catalog the server validates against. With no arguments it lists every component and action type. component (plus optional prop) returns a component's slots and props schema, action returns an action step's params, and topic: "expressions" returns the binding reference.

app-action-run

Run a declared app action as an agent. A script or task action returns run with settled; waitSeconds (up to 25) waits for every run the action's script launched or called. Scripts and extensions cannot invoke this tool.

app-action-status

Read or wait on the run an app-action-run call returned (runId). A script action's run settles when it and every run its script started have finished; a task action's run settles with its task. waitSeconds (up to 25) holds the call until the run settles.

app-query

Run a declared named query with optional parameters and return its rows.

app-history

List version snapshots for an app.

app-diff

Show a unified diff between two app snapshots, or between a snapshot and the current definition.

app-rollback

Restore a historical snapshot through the same schema-migration and exported-element compatibility gates used for updates.

app-sync

Refresh an app's declared sources. Each selected model/source pair runs through its source script and connection, then reconciles projected rows while preserving operator-managed fields.

ParameterTypeRequiredDescription
appIdstringYesApp ID whose sources should sync
modelstringNoLimit the sync to one model
sourcestringNoLimit the sync to one declared source

KV Tools

A Redis-like, namespaced key/value store. Calls auto-resolve namespace from your current context (Slack thread / PR / Linear issue / agent scratchpad / page). 2 MiB value cap, opt-in TTL.

kv-get

Read a key. Returns the entry or null if missing/expired. Namespace defaults to your current context. Any of path/offset/limit returns a bounded view (10 KB per channel) instead of the whole value.

ParameterTypeRequiredDescription
keystringYesKey to read
namespacestringNoOverride the auto-resolved namespace
pathstringNoDot path into the JSON value (outcome.data.rows, rows.3; escape a dot inside a key as \.). String entries holding JSON count as JSON
offsetnumberNoFirst array item / object key / string character to return. Default 0
limitnumberNoMax items / keys / characters. The page also shrinks to fit the cap

kv-set

Write a key. Each replacement is atomic but unconditional: there is no compare-and-swap, so concurrent read-modify-write callers can lose updates. Use per-writer keys and assemble on read for fan-in workloads. 2 MiB body cap.

ParameterTypeRequiredDescription
keystringYesKey to write
valueunknownYesValue. Stored as JSON by default; pass valueType: 'string' or 'integer' to skip JSON wrapping
valueTypeenumNojson (default), string, or integer
expiresInSecnumberNoOptional TTL in seconds. Omit for no expiry
namespacestringNoOverride the auto-resolved namespace

kv-delete

Remove a key. Returns whether a row was actually deleted.

ParameterTypeRequiredDescription
keystringYesKey to delete
namespacestringNoOverride the auto-resolved namespace

kv-incr

Atomically increment an integer entry. Creates the entry (set to by) if missing or expired. Fails if the existing value_type is not integer.

ParameterTypeRequiredDescription
keystringYesKey to increment
bynumberNoIncrement (or decrement when negative). Default: 1
namespacestringNoOverride the auto-resolved namespace

kv-list

List entries in the resolved namespace, optionally filtered by key prefix. Expired entries are filtered out.

ParameterTypeRequiredDescription
prefixstringNoKey prefix to filter on
limitnumberNoMax entries (default 100, max 1000)
offsetnumberNoPagination offset
namespacestringNoOverride the auto-resolved namespace

Skill Tools

Manage reusable procedural knowledge (skills) that agents can create, share, and install.

skill-create

Create a personal skill from SKILL.md content. Parses frontmatter for name, description, and metadata.

skill-get

Get full skill content by ID or name. Name resolution checks agent scope first, then swarm, then global. In swarm scope the ownerless skill wins, then your own, then the only agent-owned one; when several other agents own that name, it errors with their IDs: pass skillId instead.

ParameterTypeRequiredDescription
skillIdstringNoSkill ID
namestringNoSkill name (resolved with precedence)

skill-get-file

Fetch a bundled reference file from a complex skill by skill ID and relative path. Use this when the file is not available on disk.

ParameterTypeRequiredDescription
skillIdstringYesSkill ID
pathstringYesRelative path, e.g. references/animations.md

skill-list

List available skills with optional filters.

ParameterTypeRequiredDescription
typestringNoFilter by type: remote or personal
scopestringNoFilter by scope: global, swarm, or agent
agentIdstringNoFilter by owning agent

Search skills by keyword (name and description).

ParameterTypeRequiredDescription
querystringYesSearch query
limitnumberNoMax results (default: 20)

skill-install

Install/assign a skill to an agent. Leads can install for other agents.

ParameterTypeRequiredDescription
skillIdstringYesID of the skill to install

skill-uninstall

Remove a skill from an agent.

ParameterTypeRequiredDescription
skillIdstringYesID of the skill to uninstall
agentIdstringNoTarget agent (default: calling agent)

skill-update

Update a skill's content or settings. Re-parses frontmatter if content changes. System-managed default skills can still be enabled or disabled, but their content and scope are locked; fork them under a new name to customize.

ParameterTypeRequiredDescription
skillIdstringNoSkill ID to update
contentstringNoNew SKILL.md content
isEnabledbooleanNoToggle enabled/disabled
scopeagent | swarmNoPromote/demote the skill's scope. Only leads can promote to swarm (the skill-approval flow).

skill-publish

Publish a personal skill to swarm scope. Creates an approval task for the lead agent.

ParameterTypeRequiredDescription
skillIdstringYesID of the personal skill to publish

skill-delete

Delete a skill. Only the owning agent or lead can delete. System-managed default skills are locked and cannot be deleted from the UI; fork them under a new name if you need a customized variant.

ParameterTypeRequiredDescription
skillIdstringYesID of the skill to delete

skill-install-remote

Fetch and install a remote skill from a GitHub repository. SKILL.md is read with the server's GitHub token when one is configured (GitHub App installation token, else GITHUB_TOKEN), so private-repo skills install; without a token it falls back to an unauthenticated read for public repos. skill-sync-remote reads the same way.

ParameterTypeRequiredDescription
sourceRepostringYesGitHub repo (e.g. vercel-labs/skills)
sourcePathstringNoPath within repo (e.g. skills/nextjs)

skill-sync-remote

Check and update remote skills from their GitHub sources. Compares content and updates if changed.

MCP Server Tools

Manage MCP server definitions and installations. Servers are scoped (agent → swarm → global) and can be installed per-agent.

mcp-server-create

Create a new MCP server definition. Agent-scope servers are auto-installed for the creating agent. Swarm/global scope and stdio servers require lead.

ParameterTypeRequiredDescription
namestringYesServer name
descriptionstringNoServer description
transportstringYesstdio, http, or sse
scopestringNoScope: agent, swarm, or global (defaults to agent)
commandstringNoCommand to run (required for stdio)
argsstringNoJSON array of arguments (stdio only)
urlstringNoServer URL (required for http/sse)
headersstringNoJSON object of non-secret headers (http/sse only)
envConfigKeysstringNoJSON object mapping env var names to config key paths
headerConfigKeysstringNoJSON object mapping header names to secret config key paths
extraAuthorizeParamsstringNoJSON object string of extra OAuth authorize-request params, for example {\"access_type\":\"offline\",\"prompt\":\"consent\"}

mcp-server-get

Get MCP server details by ID or name. Name resolution uses scope cascade: agent > swarm > global.

ParameterTypeRequiredDescription
idstringNoMCP server ID
namestringNoMCP server name (resolved with scope cascade)

mcp-server-list

List MCP servers with optional filters.

ParameterTypeRequiredDescription
scopestringNoFilter by scope: global, swarm, or agent
transportstringNoFilter by transport: stdio, http, or sse
searchstringNoSearch by name or description
installedOnlybooleanNoOnly show servers installed for the calling agent

mcp-server-update

Update an MCP server's configuration. Only the owner or lead can update. Changing or enabling what a stdio server runs requires lead.

ParameterTypeRequiredDescription
idstringYesMCP server ID
namestringNoNew name
descriptionstringNoNew description
transportstringNoNew transport type
commandstringNoNew command (stdio)
argsstringNoNew JSON array of arguments
urlstringNoNew URL (http/sse)
headersstringNoNew JSON object of non-secret headers
envConfigKeysstringNoNew env config key mappings
headerConfigKeysstringNoNew header config key mappings
extraAuthorizeParamsstringNoJSON object string of extra OAuth authorize-request params, for example {\"access_type\":\"offline\",\"prompt\":\"consent\"}
isEnabledbooleanNoToggle enabled/disabled

mcp-server-install

Install an MCP server for an agent. Self-install is always allowed; cross-agent requires lead.

ParameterTypeRequiredDescription
mcpServerIdstringYesID of the MCP server to install

mcp-server-uninstall

Uninstall an MCP server from an agent.

ParameterTypeRequiredDescription
mcpServerIdstringYesID of the MCP server to uninstall
agentIdstringNoTarget agent (default: calling agent)

mcp-server-delete

Delete an MCP server definition. Only the owning agent or lead can delete.

ParameterTypeRequiredDescription
idstringYesMCP server ID

Scripts Tools

Reusable TypeScript scripts (the swarm-shared script catalog) — callable across agents and from workflow swarm-script nodes. The runtime evaluates user-supplied TS in a sandboxed Bun.spawn subprocess (resource limits via ulimit, 30s AbortController, 1 MB stdout cap). Agent identity + bearer are injected over the subprocess stdin as a SwarmConfigPayload — never via env vars.

Use script-run for direct reusable-script execution. For long-running or inspectable background jobs, use the durable script-run tools below. For local-only throwaway TS, use code-mode run.

Search the swarm-shared scripts catalog.

ParameterTypeRequiredDescription
querystringNoSearch query (default: empty)
limitnumberNoMax results (default: 10)

script-run

Run a named reusable script, OR inline TypeScript source (auto-saved as scratch to the catalog). Inline source executes without a compile-time typecheck. Its default export must receive args first and ctx second; import ScriptContext from "swarm-sdk" so the same source remains safe to promote with script-upsert.

ParameterTypeRequiredDescription
namestringNoName of a reusable script to run
sourcestringNoInline TypeScript source exporting function (args, ctx); no compile-time typecheck
argsunknownNoJSON-serializable script arguments
intentstringNoWhy this script is being run
scopestringNoOptional scope for named script resolution
fsModestringNoFilesystem mode (none only in v1)
executornative | quickjsNoExecutor override for this run. When omitted, named scripts use their saved executor, else SCRIPT_EXECUTOR
objectobjectNo{ id, method }: call this object ID and method on the named global DurableObject script. See Durable objects
idempotencyKeystringNoRun key. A successful run saves its output to KV script:executions/{key} (a re-run overwrites it). Every ctx.swarm call in the run derives its own key from it, so a re-run under the same key (same agent, within 7 days) replays the first run's tool-bridge writes (task_send, slack_post, ...) and workflow_trigger calls instead of repeating them. A nested script_run inherits a derived key. Reads and REST-routed writes (kv_*, schedule_*) run again.

script-upsert

Create or update a named script. Source must export a default function (args, ctx) and should type ctx as ScriptContext from "swarm-sdk". Unlike inline script-run, upsert runs tsc --noEmit against the generated .d.ts and rejects on diagnostics.

ParameterTypeRequiredDescription
sourcestringYesTypeScript source with a default export function. A global script can instead export default class X extends DurableObject<State> (import DurableObject from "swarm-sdk")
descriptionstringNoHuman-readable script description
intentstringNoWhy this script exists
executornative | quickjsNoPer-script executor override. Null or omitted inherits SCRIPT_EXECUTOR

A script may also export a Zod schema named argsSchema describing its expected arguments. On upsert the runtime extracts it, converts it to JSON Schema via zod's toJSONSchema, and stores it on the catalog entry as argsJsonSchema — so callers can discover a script's argument shape before running it. The export is optional; scripts without it simply have a null argsJsonSchema. The schema can be written with either zod or zod/mini (import * as z from "zod/mini"); Mini uses functional forms such as z.optional(z.string()).

There is no ambient task context: pass values such as taskId through args. Inline and named scripts receive ctx.swarm, registered ctx.api / ctx.mcp connection clients, ctx.fs / ctx.sh (the agent's agent-fs drive at /afs plus scratch memory, and a bash interpreter over them), ctx.stdlib, and ctx.logger. Durable launch-script-run workflows instead receive ctx.run and journaled ctx.step.* helpers, with no connection clients, no ctx.fs / ctx.sh, and no ctx.swarm.config. See Scripts runtime for the full authoring contract.

script-delete

Permanently delete a named script and all its versions from the catalog. This cannot be undone.

script-query-types

Return the generated .d.ts SDK surface (derived from the MCP tool registry via scripts/bundle-script-types.ts). Useful for type-checking scripts locally before script-upsert.

launch-script-run

Launch a durable one-off script workflow run. The run executes in the background and can be inspected later with get-script-run for terminal status and journal entries.

ParameterTypeRequiredDescription
sourcestringYesTypeScript script workflow source
argsunknownNoJSON-serializable workflow arguments
idempotencyKeystringNoOptional key that returns the existing run instead of launching a duplicate
scriptNamestringNoOptional human-readable script/workflow name for the run
requestedByUserIdstringNoOptional canonical user ID to attribute the run to

get-script-run

Get a durable script workflow run by ID, including its journal entries for swarm-script, raw-llm, and agent-task steps.

ParameterTypeRequiredDescription
idstringYesScript run ID

list-script-runs

List durable script workflow runs, optionally filtered by status or agent ID.

ParameterTypeRequiredDescription
statusstringNoOptional script run status filter
agentIdstringNoOptional agent ID filter
limitnumberNoMaximum runs to return (default: 50)
offsetnumberNoPagination offset

Extension tools

The scripts capability includes tools for trusted TypeScript hook bundles. Extensions run inside the API server process. See the extensions guide for the bundle format, event contracts, and lead/operator activation workflow.

extension-list

List installed extensions with their version, activation state, priority, failure count, and owner (createdByAgentId). The owner differs from the extension runtime agentId.

ParameterTypeRequiredDescription
enabledOnlybooleanNoReturn only enabled extensions

extension-catalog

List the predefined extensions that can be installed, with their declared assets and installed state. The catalog (also GET /api/extensions/catalog) is the only install source.

No parameters.

extension-install

Install an extension from the catalog by template name, or from an inline bundle (manifest plus files). The two forms are mutually exclusive. Inline bundles need EXTENSION_ALLOW_INLINE_INSTALL=true and a lead, operator, or dashboard-user caller; with the flag off the call fails with inline_install_disabled, and workers get 403. Install creates the extension, its ext:<name> agent, and every asset it declares (scripts, and disabled schedules, workflows and skills). Any authenticated agent can install from the catalog; the installing agent becomes its owner (createdByAgentId), and workers may install subsequent versions only for their own extensions, without activating them. A trusted lead can enable the new extension with extension-enable; operators and dashboard users can also activate it. Installation itself never enables an extension.

ParameterTypeRequiredDescription
templatestringNoName of a predefined extension from extension-catalog. Exclusive with manifest/files
manifestobjectNoInline bundle manifest. Requires files
filesobjectNoInline bundle files keyed by relative path. Requires manifest
priorityintegerNoHandler priority; lower values run first
configobjectNoExtension configuration

Extension lifecycle

Enable, disable, and version activation require a lead, operator, or dashboard user. Workers can delete their own disabled extensions, but cannot activate any extension or modify another owner's bundle. EXTENSION_ALLOW_LEAD_ACTIVATION=false restricts enable, disable, and version activation to operators/dashboard users; leads can still install drafts and delete disabled extensions. Extensions execute inside the API process without host isolation.

ToolRequired parametersBehavior
extension-enableid (UUID)Load and enable an installed extension
extension-disableid (UUID)Disable an extension and remove its registered hooks
extension-activate-versionid (UUID), version (positive integer)Activate a stored version, reloading it if enabled
extension-deleteid (UUID)Delete a disabled extension and its stored history; disable it first

Get the installed id from extension-list. The script SDK exposes these tools with underscores, for example ctx.swarm.extension_enable({ id }).

Runtime pool tools

The scripts capability also registers the runtime pool tools (beta, needs RUNTIME_POOLS_ENABLED=true on the API). They proxy the runtime pools HTTP API and need HTTP MCP transport with agent identity. See Runtime pools.

ToolParametersEffect
runtime-pool-list—List runtime pools and their configuration
runtime-pool-upsertpool fields; id to updateCreate a pool (requires name, kind, and one controller placement) or update one by id. Operator or user callers only: agents, including the lead, get a permission error
runtime-pool-deletepoolId, forceDelete a pool. force unbinds its agents first
runtime-pool-bind-agentagentId, poolIdBind an agent to a pool. A null poolId removes the binding
runtime-pool-create-agentagent fields, poolIdCreate an offline agent bound to a pool. An existing lead prevents creating another lead
runtime-controller-list—List runtime controllers. Responses name secret keys and omit secret values

Debug Tools

db-query

Execute a read-only SQL query against the swarm database. Available to all authenticated agents. Queries that read a credential table (oauth_authorizations, oauth_apps, oauth_pending, user_tokens, session_tokens, script_apis, codex_oauth_device_flows) are rejected, however the table is reached (alias, CTE, view, join or subquery). Secret-shaped values in results are redacted. Use get-oauth-access-token for OAuth tokens. Results are capped by the operator-configurable DB_QUERY_MCP_MAX_ROWS limit. Read-only enforcement also applies to fallback execution when bounded queries are disabled; write statements with RETURNING cannot bypass it.

ParameterTypeRequiredDescription
sqlstringConditionalSQL query (read-only only — writes are rejected). Required unless the deprecated query alias is provided
querystringConditionalDeprecated runtime alias for sql
paramsarrayNoQuery parameters

Responses include total, truncated, and rowLimit so callers can distinguish a complete result set from one capped by the configured row limit.

data-query

Run read-only DuckDB SQL over tabular files on your agent-fs drive (csv, tsv, parquet, json, ndjson, xlsx, and .gz variants), as your own agent-fs identity. Name a file in table position (SELECT region, sum(amount) FROM '/shared/x/sales.csv' GROUP BY 1) or bind it in tables. Not for the swarm database: use db-query. Limits: 30 s, 256 MB per file, 1,000 rows per call (10,000 from scripts).

ParameterTypeRequiredDescription
sqlstringYesOne read-only DuckDB query
tablesobjectNoTable name to drive path, or {path, format} to override format detection
maxRowsnumberNoRows to return: default 100 (scripts 1000), at most 1000 (scripts 10000)
driveIdstringNoAnother readable drive in your org. Default: your default drive
cardbooleanNoAlso return a uiSpec-ready card table (first 100 rows, 20 columns)
sheetobjectNoSave the result as a new .sheet.json at this path (create-only)

integration-status

Read which integrations this swarm has connected: slack, github, linear, jira, gsc, agentmail and agentfs, each as unverified, configured or verified (the same states the dashboard status page shows), plus the slugs of the enabled script connections this agent can call. Read-only, no parameters.

get-oauth-access-token

Return a valid plaintext OAuth access token for an integrated tracker. The token is refreshed first when it is near expiry. Returns access_token only; never returns refresh_token.

ParameterTypeRequiredDescription
providerstringYesOAuth provider slug to read from oauth_tokens (for example: linear, jira)
minValiditySecondsnumberNoMinimum remaining token lifetime required before returning it (default: 300)

Memory Tools

Search accumulated memories with natural language.

ParameterTypeRequiredDescription
intentstringYesWhy you are searching for this memory
querystringYesNatural language search query
scopestringNoall, agent, or swarm
sourcestringNoFilter by source type
keyPrefixstringNoOnly memories whose key starts with this text, for example /longterm/facts/. Literal and case-sensitive; applied before the result cut
limitnumberNoMax results (default: 10)

When called inside a task, memory-search may also return response-side rateHint nudges for manual and file-index memories so agents can call memory_rate(...) without looking up the signature separately.

Retrieval blends vector and full-text matches, then expands candidates through one hop of resolved memory links before reranking. Both paths are on by default; operators can set MEMORY_HYBRID_SEARCH=0 or MEMORY_GRAPH_EXPANSION=0 to restore vector-only or non-graph behavior.

memory-get

Retrieve full details of a specific memory.

ParameterTypeRequiredDescription
intentstringYesWhy you are retrieving this memory
memoryIduuidYesMemory ID

Like memory-search, memory-get may include a rateHint in task context for memories that are worth rating.

memory-store

Store a learning as a searchable memory: a fix, a pattern, a gotcha, a fact about a repo or a person. This is the write path the system prompt names and it works on every harness. Long content is chunked on headings and embedded in the background. The caller always owns the row, for both scopes.

ParameterTypeRequiredDescription
contentstringYesThe memory body. State the fact, the context it applies to, and the evidence
namestringYesShort one-line title, used in search results and the UI
scopestringNoagent (default, only you) or swarm (every agent)
tagsstring[]NoFree-form tags, for example a repo name or a topic
taskIduuidNoThe task this learning came from
intentstringNoWhy this is worth remembering. Kept in the audit trail
keystringNoLogical path such as /longterm/facts/swarm-runtime/slug, stored on every chunk. Lowercase segments, leading /. A name that starts with /longterm/ is used as the key when key is absent. Fails if you already use that key in the scope. A key under /longterm must start with /longterm/company-story, /longterm/entities/people, /longterm/entities/customers, /longterm/facts, /longterm/decisions, /longterm/workstreams or /longterm/timeline; such a memory never expires and is protected from cleanup. /longterm/company-story, /longterm/entities and /longterm/timeline are lead-only. A memory with no key is inbox material

Returns memoryIds, chunks, and queued. Search first with memory-search when a similar memory may exist, then memory-edit it instead of storing a duplicate. The seeded memory skill holds the full guidance.

memory-edit

Edit an existing memory in place while preserving its ID, rating history, and audit trail. Agents can edit their own memories, including memories they shared with the swarm. Editing another agent's memory by ID requires a lead agent; shared visibility does not grant edit permission.

ParameterTypeRequiredDescription
memoryIduuidNoMemory ID to edit
keystringNoStructured key alternative to memoryId
scopestringNoRequired when editing by key; agent or swarm
modestringNoreplace (default) or exact
contentstringNoFull replacement content for replace mode
oldStringstringNoUnique substring to replace in exact mode
newStringstringNoReplacement string for exact mode; may be empty
intentstringYesWhy you are editing the memory
expectedVersionnumberNoOptional optimistic-concurrency guard
newKeystringNoMove the memory to this logical path on every chunk, keeping ID, rating posterior, access count and author. Alone it is a pure move (no content fields). Same allowed roots and lead-only roots as memory-store. Moving into /longterm clears the expiry on every chunk; moving out does not restore it. A move into /learnings starts a 30-day expiry; a move out of /learnings takes the source's own expiry (none for manual)

memory-delete

Delete a memory by ID. Agents can delete their own agent-scoped memories; only the lead can delete swarm-scoped memories. The same rule applies to DELETE /api/memory/{id}, which the script SDK's memory_delete calls.

ParameterTypeRequiredDescription
memoryIduuidYesMemory ID to delete

inject-learning

Lead agent pushes learnings into a worker's memory.

ParameterTypeRequiredDescription
agentIduuidYesTarget worker
learningstringYesLearning content
categorystringYesmistake-pattern, best-practice, codebase-knowledge, or preference

User Identity Tools

Tools for managing the canonical user registry across platforms.

resolve-user

Look up a canonical user profile by a (kind, externalId) pair (e.g. {kind: "slack", externalId: "U_X"}), email (primary or alias), canonical swarm userId, or display name. Caller must supply exactly one lookup mode; empty input is rejected. Name lookup uses exact/first-token prefix matching and returns structured ambiguous candidates instead of guessing. Responses for resolved users include externalIds: Array<{kind, externalId}> so callers can reverse-look up platform handles (GitHub, Slack, etc.) from a canonical user ID.

ParameterTypeRequiredDescription
kindstringConditionalIdentity kind — slack, linear, github, gitlab, jira, or custom. Pair with externalId.
externalIdstringConditionalPlatform-specific identifier for the given kind (Slack user ID, Linear UUID, GitHub login, etc.). Pair with kind.
emailstringConditionalEmail address (primary or alias). Used when kind + externalId is not supplied.
userIduuidConditionalCanonical swarm user ID. Useful when a child task receives requestedByUserId and needs to reverse-resolve the platform handle (e.g. GitHub login for gh pr create --assignee).
namestringConditionalHuman display-name search (exact or first-token prefix). Ambiguous matches return candidates rather than selecting one.

Migration note (2026-05): provider-specific fields such as slackUserId, linearUserId, githubUsername, and gitlabUsername were removed. Use the provider-agnostic {kind, externalId} pair instead. Name search is a convenience lookup only and must not be used to stamp identity when multiple candidates are returned.

manage-user

Create, update, delete, or list user profiles in the user registry. Lead-only. Identities are managed via a declarative identities: [{kind, externalId}] array. On update, the array is treated as the desired set — entries not currently linked are added (emit identity_added); currently linked entries missing from the array are removed (emit identity_removed). Omit the field to leave identities untouched. Email-alias edits emit dedicated email_added / email_removed events.

ParameterTypeRequiredDescription
actionstringYescreate, update, delete, list, or get
userIdstringNoUser ID (required for update/delete/get)
namestringNoDisplay name (required for create)
emailstringNoPrimary email address
titlestringNoProfile title (for example, "founder" or "engineer").
rolestringNoDeprecated alias for title. If both fields differ, the request fails.
notesstringNoFree-form notes
identitiesarray<{kind, externalId}>NoDeclarative list of platform identities. On create every entry is linked; on update the diff is applied.
emailAliasesarray<string>NoAdditional email addresses. Diff vs current emits email_added / email_removed events on update.
preferredChannelstringNoPreferred contact channel
timezonestringNoTimezone (e.g., America/New_York)
dailyBudgetUsdnumber | nullNoDaily budget cap in USD. null = unlimited.
statusinvited | active | suspendedNoUser lifecycle status (defaults to active).
metadataobject | nullNoFree-form JSON metadata. null clears the field.
avatarobject or nullNoCustom avatar, one of: { type: "lucide", icon: "<kebab-case-name>", color?: "#RRGGBB" }; { type: "url", url: "https://…" } (https only, no credentials); { type: "agent-fs", path: "/users/<id>/avatar.png", orgId?, driveId? } (both IDs or neither for the swarm drive). Pass null to reset to initials.

Migration note (2026-05): the old top-level identity fields (slackUserId, linearUserId, githubUsername, gitlabUsername) were removed. Pass identities through the identities array instead.

Repository Tools

Tools for managing registered repos and their guidelines.

get-repos

List registered repos with their guidelines (PR checks, merge policy, review guidance).

ParameterTypeRequiredDescription
namestringNoFilter by repo name (returns all if omitted)

update-repo

Update a repo's configuration including guidelines (prChecks, mergeChecks, allowMerge, review, and the per-repo mergePolicy record: autoMerge, agentsMayMerge, notify). Only the lead can change allowMerge or mergePolicy: resend their current values to edit other guidelines. A non-lead agent on an agent session token also cannot change url, clonePath or hooks. A url or clonePath that starts with - is refused. See Repo merge policy.

ParameterTypeRequiredDescription
idstringYesRepo ID to update
urlstringNoNew repo URL
namestringNoNew repo name
clonePathstringNoNew clone path
defaultBranchstringNoNew default branch
autoClonebooleanNoWhether to auto-clone
hooksobject | nullNoHook install config. Best-effort worker git-hook installation is on by default for new repos; disable it with { enabled: false } (or null), or turn it back on with { enabled: true }

On this page

Capability FlagsTool Search & AnnotationsLarge Result HandlingRealtime roomsPrimitive objectsCore Toolsjoin-swarmpoll-taskget-swarmget-taskssend-tasklist-model-profilescheck-model-profileget-task-detailsstore-progresscancel-tasksubmit-improvementsteer-taskaccept-steermy-agent-infoConfig Toolsset-configget-configlist-configdelete-configcredential-bindingsscript-connectionsmodel-catalog-refreshmodel-catalog-overlay-upsertPrompt Template Toolslist-prompt-templates / get-prompt-template / set-prompt-template / delete-prompt-template / preview-prompt-templateSlack Toolsslack-replyslack-readslack-postslack-start-threadslack-create-channelslack-invite-to-channelslack-archive-channelslack-list-channelsslack-upload-fileslack-download-fileslack-leave-threadregister-agentmail-inboxregister-kapso-numberunregister-kapso-numbersend-whatsapp-messagereply-whatsapp-messageExternal Route Toolsswarm_xMetrics Toolscreate_metricTask Pool Toolstask-actionMessaging Toolspost-message / read-messagescreate-channel / list-channels / delete-channelProfile Toolsupdate-profilecontext-historycontext-diffScheduling Toolscreate-schedule / list-schedules / update-schedule / patch-schedule / delete-schedule / run-schedule-nowdefer-taskWorkflow Toolscreate-workflowget-workflowlist-workflowsupdate-workflowdelete-workflowtrigger-workflowget-workflow-runRelatedlist-workflow-runsretry-workflow-runcancel-workflow-runpatch-workflowpatch-workflow-nodeHuman-in-the-Loop Toolsrequest-human-inputcancel-approval-requestPages Toolscreate_pagedelete-pagedesign-system-getdesign-system-setApp Toolsapp-listapp-getapp-upsertapp-patchapp-patch-nodeapp-catalogapp-action-runapp-action-statusapp-queryapp-historyapp-diffapp-rollbackapp-syncKV Toolskv-getkv-setkv-deletekv-incrkv-listSkill Toolsskill-createskill-getskill-get-fileskill-listskill-searchskill-installskill-uninstallskill-updateskill-publishskill-deleteskill-install-remoteskill-sync-remoteMCP Server Toolsmcp-server-createmcp-server-getmcp-server-listmcp-server-updatemcp-server-installmcp-server-uninstallmcp-server-deleteScripts Toolsscript-searchscript-runscript-upsertscript-deletescript-query-typeslaunch-script-runget-script-runlist-script-runsExtension toolsextension-listextension-catalogextension-installExtension lifecycleRuntime pool toolsDebug Toolsdb-querydata-queryintegration-statusget-oauth-access-tokenMemory Toolsmemory-searchmemory-getmemory-storememory-editmemory-deleteinject-learningUser Identity Toolsresolve-usermanage-userRepository Toolsget-reposupdate-repo