project_exec
Run a command in the project's sandbox and return its exit code, output, and duration. The command runs inside `/workspace` and nowhere else; a denylisted pattern is refused and the error names it. `timeoutSec` is capped at 300 and defaults to 120. Output over 16 KB is kept as a head and a tail with a `…[N bytes truncated]…` marker. Returns `{ exitCode, stdout, stderr, durationMs, timedOut, truncated }` — read the errors out of `stderr` verbatim, fix the first one, and re-run. `project_verify` is the tool for the build and typecheck; this one is for everything else (tests, a one-off script, a git command). Another user's project is answered with the same 'no such project' a deleted one would be.
Run a command in the project's sandbox and return its exit code, output, and duration. The command runs inside /workspace and nowhere else; a denylisted pattern is refused and the error names it.
Input
The tool takes a single JSON object. Every field, its type, and an example are on the generated reference at GET /mcp/tools, under this tool's name.
Calling it
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": { "name": "project_exec", "arguments": {} }
}Put your arguments in place of the empty object. A call that fails comes back as a normal result carrying isError: true and a message naming what went wrong, not as a JSON-RPC protocol error.
Notes
timeoutSec is capped at 300 and defaults to 120. Output over 16 KB is kept as a head and a tail with a …[N bytes truncated]… marker. Returns { exitCode, stdout, stderr, durationMs, timedOut, truncated } — read the errors out of stderr verbatim, fix the first one, and re-run. project_verify is the tool for the build and typecheck; this one is for everything else (tests, a one-off script, a git command). Another user's project is answered with the same 'no such project' a deleted one would be.
The full request and response shape, and a live playground, live on the generated reference at GET /mcp/tools.
project_fs_edit
Replace an exact string in a file in the project's sandbox. `oldString` is matched literally — not trimmed, not a regular expression — and must occur exactly once, or the edit is refused: zero matches reports that the string is not in the file, more than one reports that the match is ambiguous and names the line numbers to disambiguate with. Pass `replaceAll: true` to replace every occurrence deliberately. Returns `{ path, replacements, bytes }`. Prefer this to `project_fs_write` for a change: it cannot silently clobber a file. Another user's project is answered with the same 'no such project' a deleted one would be.
project_verify
Verify the project: run its build command, its typecheck, and check that the dev server answers 200. Returns `{ ok, build, typecheck, http, errors }` with every failure message verbatim — the `TS####` diagnostics, the compiler line and column, all of it — so you can fix the first error and verify again rather than guess. `ok` is `true` only when all three steps pass, and a passing verify is what lets you call `project_finish`; a finish before one is refused. After three failed attempts on the same error, stop and explain it in `project_finish` instead of looping. The result is recorded on this run: a verify that passed in an earlier run does not carry over. Another user's project is answered with the same 'no such project' a deleted one would be.