putty
MCPProjectProject

project_fs_write

Write a file in the project's sandbox, replacing it wholesale. Paths are relative to `/workspace`. The sandbox path rules refuse a write under `node_modules`, `.git`, `src/brand`, or `src/onchain`, and the refusal names the rule. Returns `{ path, bytes, created }` — `created` is `false` when you overwrote a file that already existed, so read before you replace. For a change to one region of a file, use `project_fs_edit`, which fails when its match is missing or ambiguous. Another user's project is answered with the same 'no such project' a deleted one would be.

Write a file in the project's sandbox, replacing it wholesale. Paths are relative to /workspace. The sandbox path rules refuse a write under node_modules, .git, src/brand, or src/onchain, and the refusal names the rule.

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_fs_write", "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

Returns { path, bytes, created } — created is false when you overwrote a file that already existed, so read before you replace. For a change to one region of a file, use project_fs_edit, which fails when its match is missing or ambiguous. 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.

On this page