Skip to main content
Glama
ssh-remote-mcp
by wcbup

Atomically Write Remote File

ssh_write
Destructive

Atomically write a remote file over SSH using a same-directory temp file and rename; existing files are protected unless overwrite is explicitly enabled.

Instructions

Atomically write a remote file via a same-directory temp file and rename. Defaults to overwrite=false to protect production files; pass overwrite=true explicitly to replace an existing file.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "target": "<target>",
      "path": "<path>",
      "content": "<content>"
    },
    "name": "ssh_write"
  }
}

Input Schema

NameRequiredDescriptionDefault
eolNoLine ending normalization (default: preserve)preserve
modeNoOptional Unix octal permissions, e.g. '0644' or '0755'
pathYesExplicit remote absolute path (e.g. /etc/nginx/nginx.conf or C:\Services\app.json) or home-relative ~/... path. Bare relative paths are rejected.
targetYesSSH target as configured host alias, host, user@host, user@host:port, or [ipv6]:port. Never include remote paths in target.
contentYesFull UTF-8 text content to write
overwriteNoMust be true to replace an existing file (default: false)
create_dirsNoCreate missing parent directories (default: true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Adds meaningful behavior beyond annotations: atomic write via same-directory temp file and rename, plus a safe default that prevents accidental overwrites unless overwrite=true is explicitly passed. Annotations already declare destructive=true and openWorld=true, so this additional safety context is valuable.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two tightly written sentences. The atomic-write mechanism is front-loaded, followed by the critical overwrite safety rule. There is no unnecessary wording.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given a seven-parameter destructive remote write with full schema coverage and rich annotations, the description covers the core atomic behavior and the key overwrite safety default. Remaining parameter details are adequately handled by the schema, and no output schema exists to warrant return-value explanation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so all parameters are already documented, including overwrite and its default. The description reinforces the overwrite semantics but adds little beyond the schema text and does not elaborate on eol, mode, path, target, content, or create_dirs.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: atomically write a remote file. The temp-file-plus-rename mechanism further clarifies it as full-file atomic replacement, but it does not explicitly distinguish itself from siblings such as ssh_edit or ssh_upload.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides useful overwrite guidance: overwrite defaults to false to protect production files, and must be explicitly set to true to replace an existing file. However, it does not state when to use this tool versus alternatives like ssh_edit or ssh_upload.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.