Reference

Every Spaces tool by category, with parameters, results, errors and approval.

The Spaces contract: 122 tools with the same names and schemas on every surface: cua mcp, cua daemon mcp and the Spaces SDKs. Contract 0.9.0, MCP protocol revision 2025-06-18, transports mcp_stdio and mcp_streamable_http. Experimental: names and shapes can change between minor versions.

Tools#

Space lifecycle#

Register, provision, list and release Spaces.

ToolDescriptionEffect
add_spaceAdd an existing computer as a Space by address and token.mutating, idempotent
remove_spaceForget a registered Space without touching it.mutating, idempotent
list_spacesList the Spaces this connection can see.read-only, idempotent
create_spaceCreate a Space: a new sandbox on this computer, on one of your computers, or in the cloud.destructive
network_showShow a Space's network: preset, what it opens, where it is enforced, what is always blocked.read-only, idempotent
network_logList what a Space tried to reach and its network blocked.read-only, idempotent
network_setTighten a Space's network: internet, none or custom lists. Opening more is the user's to do.mutating, idempotent
delete_spaceDelete a Space's sandbox and forget it.destructive
stop_spaceTurn a Space off: stop it (disk kept, memory freed) or, with suspend, suspend it (memory kept).mutating, idempotent
resize_spaceChange a Space's vCPUs, memory or disk size.mutating, idempotent
start_spaceTurn a Space back on: resume or boot it.mutating, idempotent

Commands and files#

Run shell commands and move files in and out of a Space.

ToolDescriptionEffect
space_bashRun a shell command inside the Space.destructive
space_jobRun a long command in the Space as a background job: tail its log, cancel it, or get woken when it ends.destructive
space_writeWrite literal text to a path inside the Space.destructive
uploadSend a local file or folder into the Space.destructive
send_fileSend a host file or folder into the Space's Downloads, verified by sha256 on arrival.destructive
downloadFetch a file or folder out of the Space.read-only, idempotent

Streams and display#

Stream a Space's desktop or windows, and show a Space to the operator.

ToolDescriptionEffect
stream_endpointReturn a ticketed media endpoint for the Space's desktop or one window.mutating, idempotent
list_space_windowsList the windows open inside the Space.read-only, idempotent
stream_space_windowShow one Space window in another Space's Stream section (into=<your Space>; default the parent of space) or on the operator's desktop (into=desktop).mutating, idempotent
show_space_pipPin the Space as picture-in-picture on the operator's desktop.mutating, idempotent
hide_space_pipUnpin the picture-in-picture window.mutating, idempotent
open_space_viewerOpen the full Space viewer on the operator's desktop.mutating, idempotent

Services#

Discover and call the MCP services inside a Space.

ToolDescriptionEffect
list_toolsList the MCP services and tools reachable inside the Space.read-only, idempotent
call_toolCall a service tool inside the Space.destructive
space_serviceKeep a command running in the Space: restarts, health checks, start on boot, logs.destructive

Agents#

Run coding agents inside a Space.

ToolDescriptionEffect
agent_startStart a coding agent in the Space.destructive
agent_messageSend a follow-up to an agent run.destructive
agent_eventsRead an agent run's events after a cursor.read-only, idempotent
agent_statusRead an agent run's status and result.read-only, idempotent
agent_interruptInterrupt an agent run's current turn.destructive
agent_stopStop an agent run.destructive
agent_listList agent runs in the Space.read-only, idempotent
agent_capabilitiesReport what the agent harnesses support.read-only, idempotent
agent_sign_inSign a coding agent in on the Space's computer, the agent's own way.read-only, idempotent
agent_threadsList the recent Claude Code, Codex and Hermes chats on this computer. For a person only.read-only, idempotent
agent_thread_readRead one of the recent Claude Code, Codex or Hermes chats on this computer. For a person only.read-only, idempotent

Persistent agents#

Named agents whose memory outlives their Space: homes in Cua Volume, routines, notifications, pause and resume, access to the user's computers.

ToolDescriptionEffect
agent_addCreate a named agent whose memory outlives its Space.destructive
persistent_agent_listList persistent agents.read-only, idempotent
agent_removeForget a persistent agent.destructive
agent_sendGive a persistent agent a turn.destructive
persistent_agent_saveSave a persistent agent's home now.mutating, idempotent
agent_pausePause a persistent agent: its run, its routines and its Space.mutating, idempotent
agent_resumeResume a paused persistent agent.destructive
agent_schedule_addSchedule a recurring turn for a persistent agent.destructive
agent_schedule_listList routines.read-only, idempotent
agent_schedule_removeDelete a routine.mutating, idempotent
agent_schedule_set_enabledTurn a routine on or off.mutating, idempotent
notify_userTell the user something in the Cua app.destructive
notifications_listRead the notifications feed.read-only, idempotent
notifications_ackMark notifications read.mutating, idempotent
computer_access_grantLet a persistent agent use one of the user's computers.destructive
computer_access_revokeTake back a persistent agent's access to a computer.mutating, idempotent
computer_access_listList per-agent computer access.read-only, idempotent

Space thread and members#

Each Space's conversation: people and agent members post, an @mention wakes an agent, and anyone can check in from any device.

ToolDescriptionEffect
thread_readRead a Space's thread.read-only, idempotent
thread_postPost to a Space's thread.destructive
thread_inboxList an agent member's open tasks.read-only, idempotent
thread_claimClaim a task.destructive
thread_replyReply to a task and update it.destructive
thread_importImport an app's earlier conversation into a Space's thread.mutating, idempotent
agent_membersList a Space's agent members.read-only, idempotent
agent_set_rightsChoose who can task, stop and approve an agent.mutating, idempotent
thread_joinSet your name and icon in a Space's thread.mutating, idempotent
thread_join_code_createMake a one-time code an agent joins the Space with.destructive
thread_join_code_listList a Space's join codes.read-only, idempotent
thread_join_code_cancelCancel an unused join code.mutating, idempotent
thread_join_redeemRedeem a join code on this computer.destructive
thread_settingsRead or change a Space's thread settings.mutating, idempotent
thread_device_revokeRemove the agents connected from a computer.mutating, idempotent

Session teleport#

Move a signed-in app session from this computer into a Space.

ToolDescriptionEffect
teleport_manifestDescribe what a session teleport would move.read-only, idempotent
teleport_appMove an app session into the Space.destructive

Keyvault#

Use the user's saved credentials in a Space, only with their approval.

ToolDescriptionEffect
request_site_loginSign in to a site in the Space with the user's saved password.destructive

Hotspot#

Share this computer's network with a Space.

ToolDescriptionEffect
hotspot_startStart sharing this computer's network with a Space.destructive
hotspot_stopStop sharing this computer's network.destructive
hotspot_statusReport which Spaces are sharing this computer's network, with counters.read-only, idempotent

Cua Volume#

Read and write the volume every Space and agent shares, decide who may reach what, and see where it is stored and how it syncs.

ToolDescriptionEffect
volume_lsList a folder of the Cua Volume.read-only, idempotent
volume_readRead a file from the Cua Volume.read-only, idempotent
volume_writeWrite a file to the Cua Volume.destructive
volume_deleteDelete a file from the Cua Volume.destructive
volume_historyList a Cua Volume file's versions.read-only, idempotent
volume_restoreRestore an old version of a Cua Volume file.destructive
volume_grantGrant an agent or Space more Cua Volume access.destructive
volume_revokeRevoke a Cua Volume grant.mutating, idempotent
volume_grantsList Cua Volume grants.read-only, idempotent
volume_request_accessAsk the user for more Cua Volume access.destructive
volume_requestsList Cua Volume access requests waiting for the user.read-only, idempotent
volume_approveApprove a Cua Volume access request.destructive
volume_denyDecline a Cua Volume access request.destructive
volume_auditRead the Cua Volume audit log.read-only, idempotent
volume_storageShow where the Cua Volume keeps its bytes.read-only, idempotent
volume_storage_setTest or change where the Cua Volume keeps its bytes.mutating, idempotent
volume_mount_statusShow whether the Cua Volume is mounted as a volume.read-only, idempotent
volume_mountMount the Cua Volume as a volume.mutating, idempotent
volume_unmountUnmount the Cua Volume volume.mutating, idempotent
volume_sync_statusShow the Cua Volume's sync state across devices.read-only, idempotent
volume_sync_eventsWait for Cua Volume sync events.read-only, idempotent
volume_sync_resolveMark a Cua Volume sync conflict as seen.mutating, idempotent
volume_cache_statsShow the Cua Volume block cache.read-only, idempotent
volume_cache_setSet the Cua Volume block cache's size cap.mutating, idempotent
volume_cache_clearClear the Cua Volume block cache.mutating, idempotent

Sharing#

Let other cua.ai accounts watch or edit a Space, through the relay.

ToolDescriptionEffect
share_spaceLet someone in your team watch or edit a Space.mutating, idempotent
unshare_spaceStop sharing a Space with an account, or with everyone.mutating, idempotent
space_sharesList who a Space is shared with.read-only, idempotent
relay_register_spacePublish a Space on the relay for the account's other devices.mutating, idempotent
relay_unregister_spaceTake a Space off the relay.mutating, idempotent

Your cloud#

Create Spaces in your own AWS, Google Cloud, Hetzner or Modal account: connect it, check it, and clean up what Cua created there.

ToolDescriptionEffect
cloud_statusList your clouds (AWS, Google Cloud, Hetzner, Modal): found credentials, the connected account and region, what each can run at what hourly cost, and what Cua created there.read-only, idempotent
cloud_connectConnect a cloud account Spaces can be created in.mutating, idempotent
cloud_testCheck a cloud account without creating anything.read-only, idempotent
cloud_disconnectForget a connected cloud account (deleting what Cua created there first, with delete=true).destructive
cloud_approveApprove (or deny) what an agent asked for on a cloud: its link or its raised limits. For a person only.destructive
cloud_sweepFind and delete what Cua left in your clouds.destructive
cloud_planShow (or apply) the elastic pool's plan for some Spaces: where they go, which machines it adds, and the cost.destructive
cloud_hostsList the hosts the elastic pool added in your clouds.read-only, idempotent
cloud_add_hostAdd hosts to your pool in a linked cloud.destructive
cloud_remove_hostRemove hosts this home added to your pool.destructive
cloud_budgetRead or set the elastic pool's budget and autoscale switch.mutating, idempotent
cloud_reconcileRun the elastic pool's scale-in pass now.destructive
prewarmKeep Spaces of one shape ready where the elastic pool puts them, so the next creates start in a fraction of a second.destructive
prewarm_listList the prewarms and how many Spaces each keeps ready.read-only, idempotent
prewarm_removeEnd a prewarm: its ready Spaces go.mutating, idempotent
cloud_auditRead the log of what Cua did in your clouds.read-only, idempotent
cloud_costEstimate what Cua's machines in your clouds cost, by Space, agent, day or cloud.read-only, idempotent

Space ids#

Every tool that takes space accepts a Space id or its name.

ProviderIdTools
cloudcloud:<name>all but the provider-only ones
locallocal:<name>all but the provider-only ones
directdirect:<host:port>all but the provider-only ones
relayrelay:<computer-id>all but the provider-only ones

Approval#

  • cua mcp --permissions (or CUA_MCP_PERMISSIONS) gates each tool as spaces:<tool>. spaces:all grants every tool, spaces:readonly only the read-only ones.
  • Each tool publishes MCP annotations (readOnlyHint, destructiveHint, idempotentHint, openWorldHint); clients use them to decide what to confirm. The Approval row of each tool shows them.
  • Metered tools () allocate or extend a billed cloud Space. Everything else is free.
  • Agent runs are auto-approved inside the Space: the Space is the sandbox. A session teleport needs an approval minted from its manifest, and acknowledge_sensitive for sensitive items.

Errors#

A tool that fails returns a normal result with isError: true, never a protocol error:

{
  "content": [{ "type": "text", "text": "error: <message>" }],
  "isError": true,
  "structuredContent": { "error": { "kind": "<kind>", "message": "<message>" } }
}

Branch on kind; the message is for people. Every tool can return invalid_argument. A tool that takes space can also return not_found and ambiguous_sandbox; one with spacesd requires, spacesd_not_available and capability_missing; one with host requirements, host_capability_missing. Each tool lists the rest.

Error kinds#

KindMeaning
invalid_argumentAn argument is missing, malformed or out of range.
not_foundNo Space, run, window, service, tool or file with that id.
spacesd_not_availableThe computer answered but runs no cua-spacesd, so the spacesd primitives cannot work.
capability_missingThe Space's cua-spacesd reports a feature this tool needs as unsupported; the message names it and the driver's limitation.
host_capability_missingA prerequisite on this computer is missing: a local runtime, an operator display or app-session providers.
wrong_providerThe operation does not apply to this kind of Space.
unauthenticatedThe Space's spacesd or the cua.ai relay rejected the token.
permission_deniedThe signed-in account may not reach that relay computer.
ambiguous_hostThe computer name given to on="host:<name>" fits several of your computers equally well; the message lists them.
limit_exceededThe host is at a capacity limit: two macOS VMs per Mac (Apple's macOS license, enforced by Apple Virtualization) or the host's own Space limit.
host_capacityThe machine has no room for another Space now: its VMs are at their memory limit (shared snapshot memory counted once) or CPU limit, or it is low on memory. Nothing was started; the message says which limit and by how much.
ambiguous_sandboxA short name matches more than one sandbox.
transfer_failedA file transfer did not land, or landed with a different sha256.
teleport_refusedThe teleport consent gate refused: a sensitive item without acknowledge_sensitive, a declined approval, or a Space that cannot import the app.
login_refusedThe Keyvault refused a site login: the user declined, no saved password matches the page's origin, the tab is on another origin, or the Keyvault is locked or off.
agentAn agent run failed outside the transport: install, configuration or a refused message.
timeoutA wait ran out: a claim that never bound, a Space that never became ready, or a command past its timeout.
cancelledThe create was cancelled (cancel_create, or its caller went away); what it made is gone.
streamThe media plane failed to open or run the stream.
envA cua-spacesd call failed.
invalid_placementThe location, kind or runtime does not exist, or the combination (with the image) does not.
sandboxStarting, stopping or deleting the Space's sandbox failed.
cloudYour cloud account refused or failed a call Cua made for a Space there (AWS, Google Cloud, Hetzner, Modal): a missing permission, a quota, a region without the instance type. The message names the cloud's own error.
relayThe cua.ai relay directory failed.
mcpAn MCP service inside the Space failed.
ioReading or writing a local file failed.
jsonA reply could not be parsed.
forbiddenThe drive's access rules refuse this principal on this path (an agent outside its own home, its Space's folder, read-only public/ and its grants).
precondition_failedA drive write or delete with if_etag or create_only found a different version at the path.
secret_detectedA write under agents/ carries something that looks like a secret (an API key, a token, a private key); it was not stored. The message names the kind and line, never the value.
lease_heldAnother run holds the persistent agent's home (one writer at a time).
not_signed_inRedeeming a join code needs the redeemer's Cua sign-in, and this computer is not signed in.
join_code_refusedThe join code was used, cancelled or has expired, or it is for a Space on another computer. The daemon never says which.
rate_limitedToo many wrong join codes from this account, or too many posts from this agent (30 a minute, 600 an hour).
task_claimedAnother session of the agent (or a newer drive of the same session) holds the task's claim; the message names the holder (<member>/<session>@<epoch>).
not_confirmedThe user did not confirm with presence (Touch ID, the login password or the vault passphrase), so no access was widened.
volume_backendThe drive's store failed or is not configured (a bucket that refused, missing keys, or a backend this build cannot serve).

invalid_argument#

An argument is missing, malformed or out of range.

Fix: Check the call against the tool's input schema; the message names the argument.

Listed by network_show, network_set, resize_space, space_service, agent_thread_read, thread_join, thread_join_code_create, thread_join_code_cancel, volume_storage_set, volume_cache_set, relay_unregister_space, cloud_connect, cloud_approve, cloud_add_host, cloud_budget, prewarm.

not_found#

No Space, run, window, service, tool or file with that id.

Fix: List what exists first (list_spaces, agent_list, list_space_windows, list_tools).

Listed by network_show, network_log, network_set, space_job, space_service, agent_thread_read, thread_join_code_cancel, volume_sync_resolve, cloud_remove_host.

spacesd_not_available#

The computer answered but runs no cua-spacesd, so the spacesd primitives cannot work.

Fix: Use an image that runs cua-spacesd (for example ghcr.io/trycua/linux:24.04), or reach the Space's own services with list_tools and call_tool.

capability_missing#

The Space's cua-spacesd reports a feature this tool needs as unsupported; the message names it and the driver's limitation.

Fix: Use a Space whose spacesd supports the feature (see the tool's requires).

Listed by space_service.

host_capability_missing#

A prerequisite on this computer is missing: a local runtime, an operator display or app-session providers.

Fix: Set up what the message names (see the tool's host_requires).

wrong_provider#

The operation does not apply to this kind of Space.

Fix: Use a tool that serves the Space's provider (see the tool's providers).

Listed by network_log, network_set, stop_space, resize_space, start_space, space_job.

unauthenticated#

The Space's spacesd or the cua.ai relay rejected the token.

Fix: Re-add the Space with a valid token, or sign in again with cua auth login.

Listed by add_space, list_spaces, share_space, unshare_space, space_shares, relay_register_space, relay_unregister_space.

permission_denied#

The signed-in account may not reach that relay computer.

Fix: Sign in with the account that owns the computer.

Listed by stop_space, start_space, agent_threads, agent_thread_read, thread_import, agent_set_rights, thread_join, thread_join_code_create, thread_join_code_cancel, thread_join_redeem, thread_settings, thread_device_revoke, share_space, unshare_space, relay_unregister_space.

ambiguous_host#

The computer name given to on="host:<name>" fits several of your computers equally well; the message lists them.

Fix: Ask the user which computer they meant, then pass on="host:<computer id>" from the list.

Listed by create_space.

limit_exceeded#

The host is at a capacity limit: two macOS VMs per Mac (Apple's macOS license, enforced by Apple Virtualization) or the host's own Space limit.

Fix: Delete a Space on that host (delete_space), pick another computer, or create a Linux Space instead.

Listed by create_space, cloud_plan, prewarm.

host_capacity#

The machine has no room for another Space now: its VMs are at their memory limit (shared snapshot memory counted once) or CPU limit, or it is low on memory. Nothing was started; the message says which limit and by how much.

Fix: Delete a Space (delete_space), create it smaller (cpus, memory_mb), or create it with on="auto" so another machine takes it.

ambiguous_sandbox#

A short name matches more than one sandbox.

Fix: Use the full id (local:<name> or cloud:<name>).

transfer_failed#

A file transfer did not land, or landed with a different sha256.

Fix: Retry; check free space and permissions at the destination.

Listed by space_write, upload, send_file, download, teleport_app.

teleport_refused#

The teleport consent gate refused: a sensitive item without acknowledge_sensitive, a declined approval, or a Space that cannot import the app.

Fix: Read teleport_manifest, then pass the items to move and acknowledge_sensitive=true for sensitive ones.

Listed by teleport_app.

login_refused#

The Keyvault refused a site login: the user declined, no saved password matches the page's origin, the tab is on another origin, or the Keyvault is locked or off.

Fix: Ask the user to approve the sign-in in Cua, import the site's saved password, or open the site's sign-in page and try again.

Listed by request_site_login.

agent#

An agent run failed outside the transport: install, configuration or a refused message.

Fix: Read agent_status and its output_tail for the reason.

Listed by agent_start, agent_message, agent_events, agent_status, agent_interrupt, agent_stop, agent_list, agent_sign_in, agent_add, agent_remove, agent_send, persistent_agent_save, agent_pause, agent_resume.

timeout#

A wait ran out: a claim that never bound, a Space that never became ready, or a command past its timeout.

Fix: Retry, or raise the tool's timeout.

Listed by create_space, resize_space, start_space, space_bash.

cancelled#

The create was cancelled (cancel_create, or its caller went away); what it made is gone.

Fix: Nothing to clean up; create it again when you want it.

stream#

The media plane failed to open or run the stream.

Fix: Check that the Space's spacesd supports desktop_stream or window_stream, then retry.

Listed by stream_endpoint, stream_space_window.

env#

A cua-spacesd call failed.

Fix: Retry; if it persists, check the spacesd log in the Space.

invalid_placement#

The location, kind or runtime does not exist, or the combination (with the image) does not.

Fix: Use one of the values the message lists, or leave kind and runtime unset (auto).

Listed by create_space.

sandbox#

Starting, stopping or deleting the Space's sandbox failed.

Fix: Check the local runtime (cua doctor) or the cloud pool, then retry.

Listed by create_space, network_log, network_set, delete_space, stop_space, resize_space, start_space, agent_pause, agent_resume.

cloud#

Your cloud account refused or failed a call Cua made for a Space there (AWS, Google Cloud, Hetzner, Modal): a missing permission, a quota, a region without the instance type. The message names the cloud's own error.

Fix: Fix what the message names in that account (cua cloud test <provider> checks without creating anything), or connect another region or project.

Listed by stop_space, start_space, cloud_connect, cloud_test, cloud_disconnect, cloud_approve, cloud_sweep, cloud_plan, cloud_hosts, cloud_add_host, cloud_remove_host, cloud_reconcile, prewarm, prewarm_list, prewarm_remove.

relay#

The cua.ai relay directory failed.

Fix: Retry; check cua auth status.

Listed by list_spaces, stop_space, start_space, share_space, unshare_space, space_shares, relay_register_space, relay_unregister_space.

mcp#

An MCP service inside the Space failed.

Fix: Check the service with list_tools; the message carries its error.

Listed by list_tools, call_tool.

io#

Reading or writing a local file failed.

Fix: Check the path and its permissions on this computer.

Listed by upload, send_file, download.

json#

A reply could not be parsed.

Fix: Retry; report it if it persists.

forbidden#

The drive's access rules refuse this principal on this path (an agent outside its own home, its Space's folder, read-only public/ and its grants).

Fix: Ask for access with volume_request_access; the user approves it in Cua.

Listed by thread_post, thread_reply, volume_ls, volume_read, volume_write, volume_delete, volume_history, volume_restore, volume_grant, volume_revoke, volume_grants, volume_request_access, volume_requests, volume_approve, volume_deny, volume_audit, volume_storage, volume_storage_set, volume_mount_status, volume_mount, volume_unmount, volume_sync_status, volume_sync_events, volume_sync_resolve, volume_cache_stats, volume_cache_set, volume_cache_clear.

precondition_failed#

A drive write or delete with if_etag or create_only found a different version at the path.

Fix: Read the file again and retry with its current etag.

Listed by volume_write, volume_delete.

secret_detected#

A write under agents/ carries something that looks like a secret (an API key, a token, a private key); it was not stored. The message names the kind and line, never the value.

Fix: Remove the secret from the file; keep credentials in the Keyvault.

Listed by persistent_agent_save, volume_write, volume_restore.

lease_held#

Another run holds the persistent agent's home (one writer at a time).

Fix: Wait for that run to stop, or stop it; the lease expires on its own.

Listed by agent_send.

not_signed_in#

Redeeming a join code needs the redeemer's Cua sign-in, and this computer is not signed in.

Fix: Sign in (cua auth login), then redeem the code again.

Listed by thread_join_redeem.

join_code_refused#

The join code was used, cancelled or has expired, or it is for a Space on another computer. The daemon never says which.

Fix: Ask for a new link in Add an agent.

Listed by thread_join_redeem.

rate_limited#

Too many wrong join codes from this account, or too many posts from this agent (30 a minute, 600 an hour).

Fix: Wait the time the message gives, then try again.

Listed by thread_join_redeem.

task_claimed#

Another session of the agent (or a newer drive of the same session) holds the task's claim; the message names the holder (<member>/<session>@<epoch>).

Fix: Leave the task to its holder; it is queued again on its own if the holder's lease runs out.

Listed by thread_claim.

not_confirmed#

The user did not confirm with presence (Touch ID, the login password or the vault passphrase), so no access was widened.

Fix: Ask the user to approve it in Cua.

Listed by computer_access_grant, volume_grant, volume_approve.

volume_backend#

The drive's store failed or is not configured (a bucket that refused, missing keys, or a backend this build cannot serve).

Fix: Check cua volume config show and the message.

Listed by volume_ls, volume_read, volume_write, volume_delete, volume_history, volume_restore, volume_unmount.

Protocol errors#

JSON-RPC errors are about the message, not the tool.

CodeNameWhen
-32700PARSE_ERRORThe message is not valid JSON.
-32600INVALID_REQUESTThe message is not a JSON-RPC request: an empty batch, or no method.
-32601METHOD_NOT_FOUNDAn unknown method, or tools/call of a tool this server does not expose (not in the contract, or filtered out by permissions).
-32602INVALID_PARAMStools/call without a tool name.