Skip to content
DocsAll docs
Console

Agent tools

Lists the tools of the Kode agent tool set, with the arguments and the route of each.

Last updated

On this page

Conventions

  • A workspace id starts with ws-, an environment id with env-. An id or a name works. The list actions give both.
  • Most tools are one per resource. The action argument picks the verb, and the Actions table of a tool lists the verbs. A call without an action that the tool has is refused with the names of the valid ones.
  • A call that lacks an argument of its action is refused with the schema of that action.
  • A workspace that workspace makes with action set to create in a desk is managed: the desk deletes it when the desk is deleted.
  • The actions create, start, and restore of workspace and env, start of run and desk, create of capsule, and add and update of service take wait: true. They answer when the object has settled, or at soft_ms (25 000 by default, 600 000 at most) with a hand-off. See Waits and hand-off.
  • The wait actions take timeout_ms (25 000 by default, 900 000 at most) and wait for an object that already exists. At the limit they answer the object with timed_out: true; call them again. A service with failing: true does not come up by waiting: read its message, fix the cause, and change the service again.
  • secret_set never prints the value back. The agent sets, lists, and deletes secrets with secret_set, secret_list, and secret_delete. It can use them in variables, but no tool reads a value.
  • service with action set to logs takes tail (default 200, maximum 2000), since in seconds (maximum 86400), and previous for the run before a crash. It starts an idle-stopped environment first. When an intercept holds the service, the answer names the workspace that serves it.
  • volume actions get and delete take the id of a volume, never its name. Read the id from the list action, or from the volume field of the workspace or the environment.
  • The first snapshot of a volume gives volume, its name. Restore and copy take a reference in snapshot_id: name, name@N, or a snapshot id. A snapshot answer names its volume in volume. See Names and versions.
  • When env with action set to restore answers 409 with lost, the agent names services in discard only after the developer accepts the loss.
  • A command or build that runs longer than soft_ms (25 seconds by default) in exec or container_build is promoted to a process. Follow it as the Waits and hand-off paragraph says.
  • process with action set to wait on an id that ended more than 10 minutes ago, or never existed, answers state: "gone" and a hint. It is not an error.

Waits and hand-off

A call that waits never blocks for long. At soft_ms it answers {promoted: true, id, kind, next, next_err} and the work goes on. The kind says how to resume it.

kindCalls that answer itResume with
processexec, container_buildprocess wait with id, and since and since_err set to next and next_err.
workspaceworkspace create, restore, startworkspace wait.
envenv create, start, restore; service add, update; intercept startenv wait.
capsulecapsule createcapsule wait.
runrun startrun wait.
deskdesk startdesk get.

Both MCP doors speak the 2026-07-28 revision and 2025-era clients. A client that declares the io.modelcontextprotocol/tasks extension gets a task for a call that runs past 10 seconds and polls tasks/get; it never sees promoted. Other clients keep the loop above.

For a platform object the platform does the work, and next and next_err are 0. A wait action ends at timeout_ms with timed_out: true.

Scopes

An agent does not hold every tool. The tools that it holds depend on where it runs.

ScopeHeld byTools
Deskkode mcp, the Claude Code plugin, the remote connector, and the main desk of the harnessThe desk, workspace, env, volume, and account tools, the capsule, pipeline, run, secret, and connector tools, with the board. The main desk of the harness has no code tools.
WorkspaceThe desk of one workspace in the harnessThe code, package, container, and environment tools of its own workspace, with no workspace argument, and main_tell and subagent.

kode mcp serves the tools of both scopes in one list, and each tool takes the workspace or env that it acts on. The harness splits them:

  • The main desk creates, starts, stops, and deletes workspaces and environments. It holds packages with list but no other package action, and no intercept.
  • The desk of a workspace holds the code tools, packages, intercept, service, and workspace with stop and snapshot. It reports to the main desk with main_tell.
  • A subagent runs in a clone of a workspace. It holds the tools of that workspace without workspace stop, intercept, the board, workspace_ask, main_tell, and subagent.

read

Reads text files of a workspace, with line numbers.

A PNG, JPEG, GIF, or WebP file comes back as an image that the agent sees: an MCP image block on the laptop and remote doors, an image in the tool result of a desk's own agent. The tool server decides the type from the first bytes of the file, not from its name. The limit is 5 MB of base64 for one image, and for all the images of one paths call. A PNG or JPEG over it is downscaled to fit, and the answer says downscaled_from. A GIF or WebP over it answers its size, mime, and a hint. Any other binary file answers its size and mime.

Route: tool server.

ArgumentTypeRequiredMeaning
workspacestringyesThe workspace id (ws-…).
treestringnoWhich worktree to use; omit for the main one.
pathstringnoOne file to read.
pathsarray of stringnoUp to 50 files: path strings or {path, offset, limit}.
offsetintegernoFirst line to read, 1-based.
limitintegernoHow many lines to read.

write

Creates or overwrites one file of a workspace.

Route: tool server.

ArgumentTypeRequiredMeaning
workspacestringyesThe workspace id (ws-…).
treestringnoWhich worktree to use; omit for the main one.
pathstringyesThe file to create or overwrite.
contentstringnoThe whole new file content, as text.
content_b64stringnoThe whole new file content as base64, for a binary file. Give content or content_b64, not both.

The limit is 10 MiB of file content. To copy a larger file, or any file from another workspace, use transfer: its bytes go from one tool server to the other and never through the agent.

edit

Replaces exact text in the files of a workspace. If one edit does not apply, none is written.

Route: tool server.

ArgumentTypeRequiredMeaning
workspacestringyesThe workspace id (ws-…).
treestringnoWhich worktree to use; omit for the main one.
pathstringnoThe file to edit (with edits).
editsarraynoReplacements for path: {old, new, replace_all}; old must occur once unless replace_all.
filesarraynoSeveral files at once: {path, edits}, up to 50, all or nothing.

glob

Lists the files of a workspace that match a glob.

Route: tool server.

ArgumentTypeRequiredMeaning
workspacestringyesThe workspace id (ws-…).
treestringnoWhich worktree to use; omit for the main one.
patternstringyesThe glob, for example src/**/*.rs.
cwdstringnoDirectory to search under; default is the tree root.

grep

Searches the contents of the files of a workspace with a regular expression.

Route: tool server.

ArgumentTypeRequiredMeaning
workspacestringyesThe workspace id (ws-…).
treestringnoWhich worktree to use; omit for the main one.
patternstringyesThe regex to search for.
cwdstringnoDirectory to search under; default is the tree root.
globstringnoOnly search files that match this glob.
modestringnocontent (default) lists matching lines, files lists file names, count counts matches.
contextintegernoLines of context around each match.
ignore_casebooleannoMatch without regard to case.
maxintegernoStop after this many matches.

exec

Runs a command in a workspace and returns its output and exit code, or starts it as a detached process.

Route: tool server.

The extra argument notify is never, on_failure (the default), or always. It sets when the desk reports the end of a detached or promoted process as a notice. The tool server does not see it.

Any tool answer can start with notices, a list of sentences about processes that ended since the last answer. A process that crashed arrives there with its command and the last lines of its stderr. A process that a restart killed arrives there with the restart time. The notices ride as a second content item of the answer, after the result, and each arrives once.

A process that exits on its own is never restarted; the desk reports it. A detached process that a workspace stop or restart killed starts again with the workspace, with the same id. Its output then opens with [restarted <time>: <reason>]. relaunch: false on exec opts one process out: after a restart it is listed as killed_by_restart instead. A workspace that is restored or cloned relaunches no process of its source.

ArgumentTypeRequiredMeaning
workspacestringyesThe workspace id (ws-…).
treestringnoWhich worktree to use; omit for the main one.
cmdstring or array of stringyesThe command: a shell string, or an argv array that runs without a shell.
cwdstringnoWorking directory inside the tree; default is the tree root.
envobjectnoExtra environment variables, name to value.
soft_msintegernoWait this long (default 25000; a remote connector gets default 5000, maximum 20000) before answering {promoted, id} for a command still running.
headintegernoKeep only the first N lines of each output stream.
tailintegernoKeep only the last N lines of each output stream.
quietbooleannoOmit stdout and stderr from the answer when the command exits 0.
detachbooleannoRun in the background and answer {id} at once; read it with process.
relaunchbooleannoWith detach: start the process again after a workspace stop or restart (default true).
ptybooleannoNot supported; true is refused.

process

Controls the detached processes of a workspace. A long exec job becomes one.

Route: tool server.

A process that a workspace restart killed and that did not start again is answered with state: "killed_by_restart" and restarted_at. list shows it for an hour, and wait and output answer it with a hint to run the command again.

ActionRouteMeaning
listtool serverLists the detached processes.
outputtool serverReads the output of a process from a byte offset.
waittool serverWaits until a process exits or the wait runs out, and reads its output since an offset.
writetool serverWrites to the input of a process.
close_stdintool serverCloses the input of a process.
killtool serverStops a process and its children.
ArgumentTypeRequiredMeaning
actionstringyesOne of list, output, wait, write, close_stdin, kill.
workspacestringyesThe workspace id (ws-…) or name.
treestringnoWhich worktree to use; omit for the main one. Read by list, output, wait, write, close_stdin, kill.
idstringnoThe process id from exec or process list. Read by output, wait, write, close_stdin, kill.
sinceintegernoByte offset into stdout; pass back next. Read by output, wait.
since_errintegernoByte offset into stderr; pass back next_err. Read by output, wait.
timeout_msintegernoHow long to wait for exit (default and at most 20000). Read by wait.
datastringnoText to write to stdin. Read by write.
data_base64stringnoBytes to write to stdin, standard base64; use instead of data. Read by write.
signalstringnoTERM (default; KILL follows after 5 s) or KILL at once. Read by kill.

watch

Watches files of a workspace, or a command, for changes.

Route: tool server.

ActionRouteMeaning
starttool serverStarts a watch and returns its id. With paths and cmd, it runs cmd after each change batch. The event holds cmd_exit and output_tail.
polltool serverReads the events that a watch has seen since an index.
stoptool serverStops a watch.
ArgumentTypeRequiredMeaning
actionstringyesOne of start, poll, stop.
workspacestringyesThe workspace id (ws-…) or name.
pathsarray of stringnoFiles or directories whose changes to report. Read by start.
cmdstring or array of stringnoA command whose output lines are the events; with paths, run after each change batch. Read by start.
patternstringnoRegex that output lines must match to count as events. Read by start.
oncebooleannoEnd the watch at the first event. Read by start.
treestringnoWhich worktree to use; omit for the main one. Read by start.
idstringnoThe watch id from watch. Read by poll, stop.
sinceintegernoEvent index to read from; 0 is the start. Read by poll.

container_build

Builds a container image from the files of a workspace and pushes it to your registry. The image carries no provenance or SBOM attestation.

Route: tool server.

With no connected registry the tool fails with error: "no_registry", a hint to connect one in the console under Connectors, and registries. A registry that is not connected fails with error: "unknown_registry", the name, and registries.

ArgumentTypeRequiredMeaning
workspacestringyesThe workspace id (ws-…).
treestringnoWhich worktree to use; omit for the main one.
tagsstring or array of stringyesImage names to build and push, each name[:tag].
registrystringnoThe registry connector to push to; optional with one connector.
contextstringnoThe build context directory; default is the tree root.
filestringnoThe Dockerfile path.
build_argsstring or array of stringnoBuild arguments, KEY=value.
platformstringnoTarget platform, for example linux/amd64.
no_cachebooleannoBuild without the layer cache.
soft_msintegernoWait this long (default 25000; a remote connector gets default 5000, maximum 20000) before answering {promoted, id} for a build still running.
headintegernoKeep only the first N lines of output.
tailintegernoKeep only the last N lines of output.

container_push

Copies an image that the registry holds to more names, without a build.

Route: tool server.

ArgumentTypeRequiredMeaning
workspacestringyesThe workspace id (ws-…).
treestringnoWhich worktree to use; omit for the main one.
registrystringnoThe registry connector; optional with one connector.
srcstringyesThe image the registry already holds, name:tag.
dststring or array of stringyesThe new names to copy it to.

workspace

Creates, runs, copies, and removes workspaces.

Route: by action.

ActionRouteMeaning
listGET /v1/workspacesLists the workspaces.
getGET /v1/workspaces/{id}Shows the state, packages, volume, and restart_required. Also restarts, the last five restarts, each with at, reason (requested, env-changed, idle, evicted, node-lost), by (user, agent, system) and, for an idle stop, a detail sentence, and packages_missing, the declared packages that have no binary on the path.
createPOST /v1/desks/{id}/workspaces in a desk, else POST /v1/workspaces. With source: POST /v1/workspaces/{id}/cloneCreates an empty workspace, or a copy of source. With device, a device workspace on that machine. A workspace made in a desk, and a copy made by a desk caller, joins the desk.
restorePOST /v1/workspaces/restoreMakes a standalone workspace from a snapshot.
startPOST /v1/workspaces/{id}/startStarts a stopped workspace.
stopPOST /v1/workspaces/{id}/stopStops a workspace and answers stopped.
restartPOST /v1/workspaces/{id}/restart, then GET /v1/workspaces/{id} until the record lands (20 s)Restarts a workspace so that it reads new variables. Answers the workspace with restart, the new restarts entry (null with a hint when it has not landed yet). A restart that the agent asked for records by: agent.
deleteDELETE /v1/desks/{id}/workspaces/{workspace} in a desk, else DELETE /v1/workspaces/{id}Deletes a workspace for good.
waitGET /v1/workspaces/{id}, repeatedWaits until the workspace is ready, stopped, error, or deleted.
ttlPUT /v1/workspaces/{id}/ttlSets or clears the unused-time limit.
snapshotPOST /v1/workspaces/{id}/snapshotsTakes a snapshot of the workspace volume.
ArgumentTypeRequiredMeaning
actionstringyesOne of list, get, create, restore, start, stop, restart, delete, wait, ttl, snapshot.
teamstringnoThe team slug. Omit it for your own.
workspacestringfor get, start, stop, restart, delete, wait, ttl, snapshotThe workspace id (ws-…) or name.
namestringfor create, restoreThe workspace name: 1 to 40 lowercase letters, digits, or -.
imagestringnoThe container image.
packagesarray of stringnoTop-level nixpkgs attribute names such as python3 or nodejs_22, optionally attr@version. Nested paths such as python3Packages.x are refused; install Python libraries with pip.
sourcestringnoA workspace (id or name) to copy instead of creating an empty one.
devicestringnoA device id (dev-…, from kode devices list): make a device workspace on that machine. The device must be online and active in the team.
snapshotstringnoWith source a device workspace: the id (dsnap-…) of the snapshot to clone.
accessarray of stringnoDevice workspaces only: names of extra sandbox access, such as xcode or android, defined on the person's machine. An undefined name keeps the workspace from starting.
taskstringnoWhat the copy is for. Use at most 200 characters.
waitbooleannoReturn when the object has settled instead of at once.
soft_msnumbernoWith wait: milliseconds before the call hands off with promoted: true. Default 25000, maximum 600000; a remote connector gets default 5000, maximum 20000.
timeout_msnumbernoFor wait: milliseconds to wait. Default 25000, maximum 900000; a remote connector gets default 5000, maximum 20000. At the limit the answer has timed_out: true.
snapshot_idstringfor restoreThe snapshot to restore: a volume name, name@N, or a snapshot id.
ttl_secsintegernoSeconds of unused time before the object is deleted, 600 to 2592000.
clearbooleannoFor ttl: remove the limit instead of setting ttl_secs.
messagestringnoA note for the snapshot.
volumestringnoThe volume name. Required on the first push of a volume.

workspace_vars

Reads and sets the variables of a workspace.

Route: by action.

ActionRouteMeaning
getGET /v1/workspaces/{id}/envShows the stored variables. A secret shows as its reference.
setPUT /v1/workspaces/{id}/envMerges variables into the set, or replaces the set with replace.
ArgumentTypeRequiredMeaning
actionstringyesOne of get, set.
workspacestringyesThe workspace id (ws-…) or name.
variablesobjectfor setVariable name to value. A value of exactly ${{ secrets.NAME }} reads a secret.
replacebooleannoReplace the whole set instead of merging. {} clears it.
restart_on_changebooleannoRestart the workspace whenever its variables change from now on.

worktree

Adds or drops a worktree of a workspace.

Route: by action.

ActionRouteMeaning
addPOST /v1/workspaces/{id}/treesAdds a second branch checkout to the workspace and waits for it to be ready. The answer gives the path of the worktree and a note on how to reach it.
dropDELETE /v1/workspaces/{id}/trees/{name}Drops a worktree.
ArgumentTypeRequiredMeaning
actionstringyesOne of add, drop.
workspacestringyesThe workspace id (ws-…) or name.
namestringyesThe worktree name.
soft_msnumbernoWith wait: milliseconds before the call hands off with promoted: true. Default 25000, maximum 600000; a remote connector gets default 5000, maximum 20000.

packages

Reads and changes the packages of a workspace.

Route: by action.

ActionRouteMeaning
listGET /v1/workspaces/{id}Lists the packages, and missing, the entries that have no binary on the path.
addGET /v1/workspaces/{id}, then PATCH /v1/workspaces/{id}Adds entries. An entry with the same attr is replaced.
removeGET /v1/workspaces/{id}, then PATCH /v1/workspaces/{id}Removes entries.
updatePOST /v1/workspaces/{id}/packages/updateResolves the pinned versions again.
ArgumentTypeRequiredMeaning
actionstringyesOne of list, add, remove, update.
workspacestringyesThe workspace id (ws-…) or name.
packagesarray of stringfor add, removeTop-level nixpkgs attribute names such as python3 or nodejs_22, optionally attr@version. Nested paths such as python3Packages.x are refused; install Python libraries with pip. add replaces the same attr.

desk

Shows, picks, creates, and manages desks.

Route: by action.

ActionRouteMeaning
listGET /v1/desksLists your desks, each with its id, name, team, and environment. Needs no desk.
createPOST /v1/desksCreates a desk, with an environment if environment is set. It moves nothing. Needs no desk.
connectPUT /v1/desks/{id}/environmentSets the environment of desk; environment set to null disconnects it. Answers the desk's id, name, and environment.
startPOST /v1/desks/{id}/startStarts the members of a desk.
stopPOST /v1/desks/{id}/stopStops the members of a desk.
deleteDELETE /v1/desks/{id}Deletes a desk.
ttlPUT /v1/desks/{id}/ttlSets or clears the unused-time limit.
ArgumentTypeRequiredMeaning
actionstringyesOne of list, create, connect, start, stop, delete, ttl.
teamstringnoThe team slug. Omit it for your own.
namestringfor createThe desk name for create.
environmentstring or nullfor connectAn environment id or name of the desk's team. null disconnects. With create, connects it to the new desk.
ttl_secsintegernoSeconds of unused time before the object is deleted, 600 to 2592000.
deskstringfor connect, start, stop, delete, ttlThe desk id, name, or team/name.
waitbooleannoReturn when the object has settled instead of at once.
soft_msnumbernoWith wait: milliseconds before the call hands off with promoted: true. Default 25000, maximum 600000; a remote connector gets default 5000, maximum 20000.
clearbooleannoFor ttl: remove the limit instead of setting ttl_secs.

env

Creates, runs, copies, and removes environments.

Route: by action.

ActionRouteMeaning
listGET /v1/environmentsLists the environments.
getGET /v1/environments/{id}Shows the services, state, interceptedBy, proxy, restart_required, and volume.
createPOST /v1/environments. With source: POST /v1/environments/{id}/cloneCreates an environment, or a copy of source. A clone shares its source's volume and history: its snapshots appear there and take the source's volume name.
startPOST /v1/environments/{id}/startStarts an environment.
stopPOST /v1/environments/{id}/stopStops an environment.
deleteDELETE /v1/environments/{id}Deletes an environment.
waitGET /v1/environments/{id}, repeatedWaits until every service is ready, a service is failing, or the state is error or deleted.
ttlPUT /v1/environments/{id}/ttlSets or clears the unused-time limit.
snapshotPOST /v1/environments/{id}/snapshotsTakes a snapshot of the environment volume. A clone shares its source's volume and history: its snapshots appear there and take the source's volume name.
restorePOST /v1/environments/{id}/restorePuts the environment back to a snapshot in place. It creates no environment and overwrites the current data; name is not used. A 409 with lost lists the services that lose data. The snapshot is the argument source.
ArgumentTypeRequiredMeaning
actionstringyesOne of list, get, create, start, stop, delete, wait, ttl, snapshot, restore.
teamstringnoThe team slug. Omit it for your own.
envstringfor get, start, stop, delete, wait, ttl, snapshot, restoreThe environment id (env-…) or name.
namestringfor createThe environment name.
snapshot_idstringfor restoreThe snapshot to restore: a volume name, name@N, or a snapshot id.
servicesarray of objectnoThe services, each {name, image, ports, env, mounts, command}.
regionstringnoThe region of the environment.
sourcestringnoFor create: an environment (id or name) to copy live, or a snapshot id to grow a new environment from.
waitbooleannoReturn when the object has settled instead of at once.
soft_msnumbernoWith wait: milliseconds before the call hands off with promoted: true. Default 25000, maximum 600000; a remote connector gets default 5000, maximum 20000.
timeout_msnumbernoFor wait: milliseconds to wait. Default 25000, maximum 900000; a remote connector gets default 5000, maximum 20000. At the limit the answer has timed_out: true.
ttl_secsintegernoSeconds of unused time before the object is deleted, 600 to 2592000.
clearbooleannoFor ttl: remove the limit instead of setting ttl_secs.
messagestringnoA note for the snapshot.
volumestringnoThe volume name. Required on the first push of a volume.
discardarray of stringnoNames of the services in the 409 lost list whose data you accept losing.

service

Adds, changes, removes, and reads the logs of environment services.

Route: by action.

ActionRouteMeaning
addGET /v1/environments/{id}, then PATCH /v1/environments/{id}Adds one service.
updateGET /v1/environments/{id}, then PATCH /v1/environments/{id}. With restart: POST /v1/environments/{id}/services/{service}/restartMerges the fields of service into the service of that name. env: {X: null} removes the key X. With restart, restarts it.
removeGET /v1/environments/{id}, then PATCH /v1/environments/{id}Removes the service name.
logsGET /v1/environments/{id}/services/{service}/logsReads the logs of the service name. It starts an idle-stopped environment first.
ArgumentTypeRequiredMeaning
actionstringyesOne of add, update, remove, logs.
envstringyesThe environment id (env-…) or name.
serviceobjectfor add, updateThe service object. Its command, env, and mounts default to empty.
waitbooleannoReturn when the object has settled instead of at once.
soft_msnumbernoWith wait: milliseconds before the call hands off with promoted: true. Default 25000, maximum 600000; a remote connector gets default 5000, maximum 20000.
restartbooleannoRestart the service after the change so it reads its current variables and secrets.
namestringfor remove, logsThe service name.
tailnumbernoKeep the last N lines. The default is 200 and the maximum is 2000.
sincenumbernoOnly the last N seconds. The maximum is 86400.
previousbooleannoRead the run before a crash.

intercept

Sends the traffic of an environment service to a workspace, or gives it back.

Route: by action.

ActionRouteMeaning
startPOST /v1/environments/{id}/interceptsSends the traffic of the service to the workspace.
stopDELETE /v1/environments/{id}/intercepts/{service}Gives the service back to its own program.
ArgumentTypeRequiredMeaning
actionstringyesOne of start, stop.
envstringyesThe environment id (env-…) or name.
servicestringyesThe service.
workspacestringfor startThe workspace id (ws-…) or name that receives the traffic.
portsarray of objectnoFor start: port remaps. service is the port callers dial on the environment service, workspace the port the workspace listens on. Omit to forward each port to the same number.
waitbooleannoFor start: return when the proxy is ready instead of at once.
soft_msnumbernoWith wait: milliseconds before the call hands off with promoted: true. Default 25000, maximum 600000; a remote connector gets default 5000, maximum 20000.

volume

Lists, reads, and deletes volumes.

Route: by action.

ActionRouteMeaning
listGET /v1/volumesLists the volumes with ids and names. Each row carries used_by, the workspaces and environments that use the volume.
getGET /v1/volumes/{name}/history, GET /v1/volumes/{name}/refsShows the snapshots of a volume, its refs, and working. refs.latest is the newest push by time. working shows where each working copy stands: its base, its head, and its state. Each snapshot carries working_copies. A clone's first push has the latest push of its source at clone time as its parent.
deleteDELETE /v1/volumes/{name}Deletes a detached volume.
ArgumentTypeRequiredMeaning
actionstringyesOne of list, get, delete.
kindstringnoOnly volumes of this kind.
ownerstringnoOnly volumes of this owner.
volumestringfor get, deleteThe volume id from volume list.

snapshot

Deletes a snapshot of a volume.

Route: by action.

ActionRouteMeaning
deleteDELETE /v1/volumes/{name}/snapshots/{id}Deletes one snapshot.
ArgumentTypeRequiredMeaning
actionstringyesOne of delete.
volumestringyesThe volume name or id. A clone shares its source's volume and history: its snapshots appear there and take the source's volume name.
snapshotstringyesThe snapshot id.

quota

Shows the ceilings and the current use of an owner.

Route: GET /v1/quota.

ArgumentTypeRequiredMeaning
ownerstringnoThe owner: a person handle or a team slug.

requests_list

Lists the requests of the person and of their teams.

Route: GET /v1/requests.

ArgumentTypeRequiredMeaning
ownerstringnoThe owner: a person handle or a team slug.

request_get

Shows one request and its decision.

Route: GET /v1/requests/{id}.

ArgumentTypeRequiredMeaning
idstringyes

request_create

Asks an administrator for quota, access, a region, or anything else. The decision comes later.

Route: POST /v1/requests.

ArgumentTypeRequiredMeaning
ownerstringnoThe team slug. Omit it for the person's own.
kindstring, one of quota, access, region, otheryesThe kind.
reasonstringyesWhy the person asks.
quotaobjectnoThe new ceilings that you want. Give only the dimensions that change.
accessobjectno
regionstringnoThe region the team moves to (only while the team has nothing).
titlestringfor otherThe title. Without it the call answers 422 title is required for kind other.
bodystringfor otherThe text. Without it the call answers 422 body is required for kind other.

regions

Lists the regions in which a team can live.

Route: GET /v1/regions.

No arguments.

download

Hands one file of a workspace to the person. Only the owner of the workspace gets an answer, and the file is at most 200 MB. Nothing in the answer is a credential.

  • url opens the file in the Kode console. The person must be signed in as the owner. Images, PDFs and text show in the browser; other files download.
  • On an MCP door the answer also has a resource_link block with uri. The client reads the file with resources/read on its own connection, at most 7.5 MB that way.

The bytes go from the tool server to the browser or the client when they are read, never through the agent. A device workspace is read from its machine at that time, so the machine must be online.

Route: POST /v1/workspaces/{id}/file-link.

ArgumentTypeRequiredMeaning
workspacestringyesThe workspace id or name.
pathstringyesThe file, relative to the workspace.
treestringnoWhich worktree; omit for the main one.

Answer: {url, uri, name, size, mime, note}, and a resource_link content block on an MCP door.

MCP resources

Every MCP door (/mcp and kode mcp) declares the resources capability. resources/templates/list answers one template, kode://workspace/{workspace}/file/{path} (?tree=NAME for a worktree); resources/list answers none. resources/read answers contents: [{uri, mimeType, text}] for a text file and [{uri, mimeType, blob}] (base64) for any other. It reads as the connection's own person, owner only, in the teams the connection may act in, and takes no desk. A file over 7.5 MB (10 MB of base64) is refused with a sentence that names download.

transfer

Copies one file from a workspace to another workspace of yours, or to another path of the same workspace. The file is at most 200 MB and can hold any bytes. The bytes go from the tool server of the source to the tool server of the destination, in ranges of 4 MiB, and never through the agent or the MCP client. The destination appears whole when the last range is written, or not at all. A destination that exists is refused unless overwrite is true. Both workspaces must be ready; a device workspace's machine must be online.

Route: tool server, both workspaces, found through GET /v1/workspaces/{id}/tools. That route answers the owner alone, so a workspace of another person is 404.

ArgumentTypeRequiredMeaning
fromobjectyes{workspace, path, tree?}: the file to copy.
toobjectyes{workspace, path, tree?}: where it goes. Parent folders are made.
overwritebooleannoReplace the destination when it exists.

Answer: {from: {workspace, path}, to: {workspace, path, created}, bytes}. A refusal starts with from: or to: to say which side refused.

devices

Lists your own machines, the devices that run device workspaces. The id is what workspace create takes as device. Each row has id, name, os, arch, enabled, account (a handle or a team), online, last_seen_at and the workspaces the device reports. It never lists a token or the hardware id. Starting, connecting and removing a device are done on the machine.

Route: GET /v1/devices.

No arguments.

capsule

Runs one command in an isolated container.

Route: by action.

ActionRouteMeaning
createPOST /v1/desks/{id}/capsules in a desk, else POST /v1/capsulesCreates a capsule that runs command and ends when it exits.
getGET /v1/capsules/{id}Shows phase, reason, exit_code, and message.
listGET /v1/capsulesLists the capsules, each with its stage.
waitPOST /v1/capsules/{id}/wait, repeatedWaits until the capsule is terminated. The answer carries stage, such as pulling image or installing packages.
logsGET /v1/capsules/{id}/logsReads the output. An ended capsule keeps its last 256 KiB.
deletePOST /v1/capsules/{id}/terminate, then DELETE /v1/capsules/{id}Ends a running capsule, then removes its record.
ArgumentTypeRequiredMeaning
actionstringyesOne of create, get, list, wait, logs, delete.
commandstring or array of stringfor createA shell string, run with sh -c, or an argv array.
imagestringnoThe container image.
packagesarray of stringnoTop-level nixpkgs attribute names such as python3 or nodejs_22, optionally attr@version. Nested paths such as python3Packages.x are refused; install Python libraries with pip.
variablesobjectnoEnvironment variables for the command. A value of exactly ${{ secrets.NAME }} reads a secret.
lifetime_sintegernoThe hard lifetime in seconds, 10 to 86400. The default is 300.
teamstringnoThe team slug. In a desk its own team is used.
from_workspacestringnoA workspace of yours (id, name, or team/name) whose current files the capsule starts as, uncommitted work included.
from_snapshotstringnoA snapshot id or name@N whose files the capsule starts as. A snapshot of an environment is mounted at ~/volumes/<folder>, and the create answer says so in note.
waitbooleannoReturn when the object has settled instead of at once.
soft_msnumbernoWith wait: milliseconds before the call hands off with promoted: true. Default 25000, maximum 600000; a remote connector gets default 5000, maximum 20000.
timeout_msnumbernoFor wait: milliseconds to wait. Default 25000, maximum 900000; a remote connector gets default 5000, maximum 20000. At the limit the answer has timed_out: true.
capsulestringfor get, wait, logs, deleteThe capsule id (cap-…) or name.
statestringnoOnly capsules in this state: waiting, running, ended, stopped, timed-out, or failed.
qstringnoOnly capsules whose id, image, packages, or command contain this text.
limitintegernoThe maximum number of rows.
tailintegernoKeep the last N lines. The default is 200 and the maximum is 2000.
headintegernoKeep the first N lines. It applies before tail.

pipeline

Saves, reads, and deletes pipelines and their versions.

Route: by action.

ActionRouteMeaning
listGET /v1/pipelines/{owner}Lists the pipelines with the latest version and the triggers.
getGET /v1/pipelines/{owner}/{name}. With version: GET /v1/pipelines/{owner}/{name}/versions/{version}Shows the pipeline with its versions, or one definition.
savePOST /v1/pipelines/{owner} for a new pipeline, else PUT /v1/pipelines/{owner}/{name}Saves a definition as the next version.
deleteDELETE /v1/pipelines/{owner}/{name}. With version: DELETE /v1/pipelines/{owner}/{name}/versions/{version}Deletes the pipeline, or one old version.
ArgumentTypeRequiredMeaning
actionstringyesOne of list, get, save, delete.
ownerstringyesThe owner: your handle or a team slug.
pipelinestringfor get, deleteThe pipeline name.
versionintegernoget: that version. delete: only that version, not the latest and not one that a run reads.
definitionobjectfor saveThe pipeline definition (JSON). Its name names the pipeline. An equal definition saves nothing. A save that turns the webhook on answers webhookUrl once.

webhook_rotate

Makes a new webhook secret for a pipeline. The old URL stops at once. The answer holds the new webhookUrl once.

Route: POST /v1/pipelines/{owner}/{name}/webhook/rotate.

ArgumentTypeRequiredMeaning
ownerstringyesYour handle, or a team slug.
pipelinestringyesThe pipeline name.

run

Starts, reads, waits for, and cancels pipeline runs.

Route: by action.

ActionRouteMeaning
startPOST /v1/pipelines/{owner}/{pipeline}/runsStarts a run and answers its id.
listGET /v1/pipelines/{owner}/{pipeline}/runs, else GET /v1/pipelines/{owner}/runsLists the runs.
getGET /v1/pipelines/{owner}/{pipeline}/runs/{id}Shows the state, jobs, failedStep, and exitCode. A cancelled job carries no failedStep; its detail names the step that was running.
waitGET /v1/pipelines/{owner}/{pipeline}/runs/{id}, repeatedWaits until the run ends.
logsGET /v1/pipelines/{owner}/{pipeline}/runs/{id}/jobs/{index}/logsReads a page of a job log.
cancelPOST /v1/pipelines/{owner}/{pipeline}/runs/{id}/cancelCancels a run.
ArgumentTypeRequiredMeaning
actionstringyesOne of start, list, get, wait, logs, cancel.
ownerstringyesThe owner: your handle or a team slug.
pipelinestringfor start, get, wait, logs, cancelThe pipeline name.
inputsobjectnoString values by input name.
versionintegernoThe version to run. The default is the newest.
keystringnoA retry key. A second start with the same key answers the first run.
waitbooleannoReturn when the object has settled instead of at once.
soft_msnumbernoWith wait: milliseconds before the call hands off with promoted: true. Default 25000, maximum 600000; a remote connector gets default 5000, maximum 20000.
timeout_msnumbernoFor wait: milliseconds to wait. Default 25000, maximum 900000; a remote connector gets default 5000, maximum 20000. At the limit the answer has timed_out: true.
statestringnoOnly runs in this state: queued, running, success, failure, or cancelled.
limitintegernoThe maximum number of rows.
runstringfor get, wait, logs, cancelThe run id from run list or start.
jobintegernoThe index of the job in the run. The default is 0.
offsetintegernoA byte offset into the job output. logs: the page from there, with next and complete. wait: also answers that page as output.
tailintegernoKeep the last N lines. The default is 200 and the maximum is 2000.
headintegernoKeep the first N lines. It applies before tail.

secret_set

Stores a secret value and replaces an existing one. The value is never printed back. The answer holds name and updatedAt only. A workspace or service reads the secret through an environment value that is exactly ${{ secrets.NAME }}. The harness keeps each desk transcript and stores this call with value replaced by ***; the model's context still holds the value for the turn.

Route: PUT /v1/secrets/{owner}/{name}, or PUT /v1/secrets/{owner}/mine/{name} with mine.

ArgumentTypeRequiredMeaning
ownerstringyesYour handle, or a team slug. A team secret needs a team admin.
namestringyesA-Z, 0-9, and _, not starting with a digit.
valuestringyesThe value, at most 64 KiB.
minebooleannoStore your own secret in the team.

secret_list

Lists the names of the secrets of an owner, with the date and the author of the last change. It never shows a value.

Route: GET /v1/secrets/{owner}, or GET /v1/secrets/{owner}/mine with mine.

ArgumentTypeRequiredMeaning
ownerstringyesYour handle, or a team slug.
minebooleannoList your own secrets in the team.

secret_delete

Deletes one secret. The call answers 409, and names the referrers, while a workspace, capsule, service, or pipeline uses it.

Route: DELETE /v1/secrets/{owner}/{name}, or DELETE /v1/secrets/{owner}/mine/{name} with mine.

ArgumentTypeRequiredMeaning
ownerstringyesYour handle, or a team slug.
namestringyesThe secret name.
minebooleannoDelete your own secret in the team.

connector_list

Lists the connectors of an owner, with the provider, the kind, the account, and the state of each. It is read only. Connecting happens in the web console.

Route: GET /v1/connectors.

ArgumentTypeRequiredMeaning
ownerstringnoYour handle, or a team slug. The default is your own.

status

Answers the notices not yet delivered on this connection, and a short summary of what runs. It lists the workspaces of the desk and their processes. It also gives lifecycle notices: a restart, a stop, an error, and a change of the environment. A restarted bench still reports the idle stops and evictions it missed. Call it once at the start of each turn, before other work.

No route. The tool reads the desk's notice queue, GET /v1/workspaces, the desk's environment and process_list of every workspace a tool touched in the last hour.

ArgumentTypeRequiredMeaning
allbooleannoAlso list the notices already delivered (the last 50).

Result: {notices, workspaces: [{name, state}], environment: {name, state} | null, processes: [{workspace, id, cmd}]}. A notice is delivered once: a second call without all does not repeat it. Notices also ride on any other tool answer, as before.

workspace_ask

Gives a goal to the desk of a workspace. The answer arrives later as a message.

No route. The tool sends a message to the desk of the workspace.

ArgumentTypeRequiredMeaning
workspacestringyesThe workspace id (ws-…).
requeststringyes
forstringnoThe id of your own board task this ask serves.

question

Asks the developer a question and waits for the answer.

No route. The tool puts the question on the card of the desk and returns the option that the developer selects.

ArgumentTypeRequiredMeaning
questionstringyesThe question to ask.
optionsarray of stringyesThe answers that the developer can select. Give 2 to 5.

main_tell

Tells the main desk that a task is done, blocked, or needs something.

No route. The tool sends a message to the main desk. Use it from the desk of a workspace.

ArgumentTypeRequiredMeaning
kindstringyesOne of done, blocked, need.
textstringyesThe report. For blocked, say what would unblock you.

task

Keeps the board of the agent, which the developer follows.

No route. The tool reads and writes the board of the agent.

ActionRouteMeaning
listnoneLists the tasks. With workspace, lists the board of that workspace; * lists every workspace board.
addnoneAdds a task.
updatenoneChanges a task. Set it to running before you start it and to done when its check passes.
ArgumentTypeRequiredMeaning
actionstringyesOne of list, add, update.
workspacestringnoA workspace id whose board list shows. You cannot change it.
titlestringfor addThe title.
idstringfor updateThe task id.
priorityintegernoLower runs first.
depends_onarray of stringnoThe ids of the tasks that must be done first.
statestringnoOne of queued, running, blocked, done, failed.
notestringnoA note.
summarystringnoFor done: what changed and where. Use at most 2000 characters.
verifiedstringnoFor done: the check that passed, with its result.