For AI agents: the complete documentation index is available at https://enclo.nstlopez.com/llms.txt, the full documentation bundle is available at https://enclo.nstlopez.com/llms-full.txt, and this page is available as Markdown at https://enclo.nstlopez.com/reference/mcp-tools.md.

MCP tools

enclo mcp runs an MCP server over stdio. Once registered (see Connect your harness), it exposes these nine tools to the agent:

ToolWhat it does
runRuns a shell command as root and returns its exit code, stdout, and stderr
write_fileWrites up to 5 MiB of text to a file, creating parent directories as needed
read_fileReads a text file, or any file with encoding: "base64"
pushCopies a host directory into the sandbox, skipping files matched by .gitignore
createCreates a new sandbox, either empty or cloned from an existing sandbox's disk
listLists sandboxes created through MCP
stopTerminates a running command while leaving the sandbox running
shutdownPowers off a sandbox while keeping its disk; the next run boots it again
removeDeletes an MCP-created sandbox and its disk

Every tool that operates on a sandbox accepts a sandbox argument with the target sandbox ID (such as sb_k3m9x2pq). Omit it to target the session's default sandbox, which is created on first use.

run

Runs a shell command in a sandbox and returns its exit code, stdout, and stderr. Multiple commands can run in parallel. If a command runs longer than 45 seconds, run returns a still-running status with an exec_id.

ArgumentTypeDefaultMeaning
commandstringShell command line executed as sh -c <command> by root. Required unless exec_id is provided
sandboxstringthe session'sTarget sandbox ID
cwdstring/rootAbsolute working directory inside the sandbox. Must already exist
timeout_secondsinteger600Maximum runtime in seconds (up to 3600) before the command is stopped with exit code 124
exec_idintegerID of a still-running command returned by an earlier run call. Pass with sandbox only to wait up to another 45 seconds and collect new output

write_file

Writes text to a file in a sandbox, overwriting any existing content and creating parent directories as needed. Maximum size is 5 MiB.

ArgumentTypeMeaning
pathstringAbsolute file path in the sandbox, such as /root/app/main.py. Required
contentstringExact text to write to the file. Required
sandboxstringTarget sandbox ID

read_file

Reads a file from a sandbox, returning text by default or the raw bytes of any file (including binary files) with encoding: "base64".

ArgumentTypeDefaultMeaning
pathstringAbsolute file path in the sandbox. Required
sandboxstringthe session'sTarget sandbox ID
max_bytesinteger256 KiBMaximum bytes to return from the start of the file, up to 5 MiB
encoding"text" or "base64""text"Use "base64" to return raw bytes encoded as base64 (for binary files)

push

Copies a directory from your host machine into a sandbox, merging into any existing files at the destination. Files matched by .gitignore are skipped, while .git is included. Prefer push over write_file for multi-file projects. If a copy takes longer than 45 seconds, push returns an exec_id that you can pass to run to keep waiting or to stop to cancel.

ArgumentTypeDefaultMeaning
pathstringAbsolute path to the host directory. Cannot be / or your home directory itself. Required
deststring/root/<name of the directory>Absolute destination path in the sandbox
sandboxstringthe session'sTarget sandbox ID
excludestring arrayAdditional exclude patterns in .gitignore syntax, such as "node_modules/"

create

Creates a new sandbox and returns its ID. Without from, the sandbox starts empty; with from, it starts as a copy of the named sandbox's disk. You do not need to call create before run because the session's default sandbox is created automatically on first use.

ArgumentTypeDefaultMeaning
fromstringID of any existing sandbox on this machine whose disk should be copied
cpusinteger2Number of vCPUs, up to the host's core count
memory_mibinteger2048Memory in MiB, from 128 up to half of host memory
networkbooleantrueWhether the sandbox has outbound internet access

list

Lists sandboxes created by the MCP tools, showing each sandbox's ID, running state, active command count, creation and last-used timestamps, and disk usage. The session's default sandbox is marked. Sandboxes created manually with enclo new are included in the total count but omitted from the list. Takes no arguments.

stop

Terminates a running command immediately instead of waiting for its timeout. Pass exec_id to stop one command, or omit it to stop every running command started by this session in that sandbox. The sandbox stays running with its files and background processes intact. Use shutdown to power off the sandbox.

ArgumentTypeMeaning
sandboxstringTarget sandbox ID
exec_idintegerCommand ID to terminate. Omit to stop all running commands started by this session in the sandbox

shutdown

Powers off a sandbox. Running commands and background processes terminate, while files on disk are preserved for the next run. Because sandboxes already shut down automatically after 15 minutes of inactivity, call shutdown when you want a clean restart or want to free host memory immediately.

ArgumentTypeMeaning
sandboxstringTarget sandbox ID

remove

Permanently deletes an MCP-created sandbox and its disk. Sandboxes created manually with the CLI cannot be removed through this tool.

ArgumentTypeDefaultMeaning
sandboxstringID of the sandbox to delete. Required
forcebooleanfalseTerminate any running commands in the sandbox before deleting it