Skip to main content
Glama

ssh_write_file

Write text to a file on a remote SSH host with atomic replacement, preventing partial files if a write fails. Parent directories must already exist.

Instructions

Write text to a file on a remote SSH host. The write is atomic (temporary file, then rename), so a failed or interrupted write never leaves a partially-written destination. Parent directories are NOT created automatically.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostYesSSH config alias of the target host
pathYesAbsolute or relative path of the file to write
contentYesText content to write

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses atomicity (temp file then rename) and that parent directories are not created, but omits key behaviors such as whether existing files are overwritten, permission requirements, or error handling.

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?

The description is three sentences with zero waste, and the core purpose is front-loaded before the atomicity and directory-creation details. Every sentence earns its place.

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?

For a simple three-parameter write tool with no output schema and full schema coverage, the description covers the important non-obvious behaviors (atomic write, parent directory behavior). It is nearly complete, though the omission of overwrite semantics is a minor gap.

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 description coverage is 100%, so the schema already documents all three parameters. The description adds no parameter-level semantics beyond what the schema provides, making the baseline 3 appropriate.

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?

The description states a specific verb and resource: 'Write text to a file on a remote SSH host.' It clearly distinguishes from read-oriented siblings like ssh_read_file, but does not explicitly differentiate from ssh_exec, which could also write files via shell commands.

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

Usage Guidelines2/5

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

No when-to-use guidance is given, and no alternatives are mentioned. An agent must infer that this tool is for writing files rather than using ssh_exec, with no explicit conditions or exclusions provided.

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