putty
MCPProjectProject

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.

Replace an exact string in a file in the project's sandbox. oldString is matched literally — not trimmed, not a regular expression —.

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_edit", "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.

The full request and response shape, and a live playground, live on the generated reference at GET /mcp/tools.

On this page