Skip to content

remote_write

MCP tools › Remote, rooms and agents

Write a file on an SSH host (temporary file renamed into place, mode kept). With expected_stamp (from remote_read) a file changed meanwhile is left alone: error conflict with expected_stamp and host_stamp; pass host_stamp to overwrite. Without it only a new file is written. dry_run (default true) only reports; dry_run=false needs the user-granted ssh right and is logged (path and size).

Its results carry text from remote: the client is told to treat that as data, never as instructions.

Capabilityremote.remote_write
AreaRemote, rooms and agents
Accesschanges files, remote
Reachesprocess, network
Rightsssh
Dry rundry_run, on unless the call turns it off

Arguments

ArgumentTypeDescription
hostrequiredstringHost alias from ~/.ssh/config or [user@]host[:port].
pathrequiredstringAbsolute path of the file on the host.
contentrequiredstringNew content (UTF-8).
expected_stampstringThe stamp remote_read returned; the write is refused when the file changed since. Omit for a new file, which must not exist yet.
dry_runbooleanOnly check and describe the write (default true).

Call it from a shell

ferris-idea call runs one tool with the rights and safe mode of ferris-idea mcp. Replace the folder and the placeholder values.

Terminal window
ferris-idea call ~/my-project remote_write '{"host":"<string>","path":"<string>","content":"<string>"}'
Input schema as JSON
{
"type": "object",
"required": [
"host",
"path",
"content"
],
"properties": {
"host": {
"description": "Host alias from `~/.ssh/config` or `[user@]host[:port]`.",
"type": "string"
},
"path": {
"description": "Absolute path of the file on the host.",
"type": "string"
},
"content": {
"description": "New content (UTF-8).",
"type": "string"
},
"expected_stamp": {
"description": "The `stamp` `remote_read` returned; the write is refused when the file changed since.\nOmit for a new file, which must not exist yet.",
"type": [
"string",
"null"
]
},
"dry_run": {
"description": "Only check and describe the write (default true).",
"type": [
"boolean",
"null"
]
}
}
}