Skip to main content
Glama

write_file

Write text to a remote file via SSH, overwriting existing content and creating parent directories automatically.

Instructions

Write content to a remote file (overwrites existing content).

Creates parent directories if they do not exist.

Args: path: Absolute path to the destination file. content: Text content to write. host_name: Named host from SSH_HOSTS config; uses default host if omitted.

Returns: Success message or error details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
contentYes
host_nameNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description carries the full burden. It transparently discloses that the tool overwrites existing content, creates parent directories if needed, uses a default host when host_name is omitted, and returns success or error details. This is substantial, though it does not cover permissions or irreversibility beyond the word 'overwrites'.

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 concise and well-structured: a single front-loaded sentence stating the core purpose, followed by supplemental details in a clear Args/Returns format. Every sentence earns its place without redundancy.

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?

The description adequately covers the tool's purpose, parameters, and return value, and it handles host selection. Given the simplicity of the tool and the presence of an output schema, this is nearly complete. Minor omissions like file permissions or encoding edge cases prevent a perfect score.

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

Parameters5/5

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

The schema provides only parameter names and types (0% coverage). The description compensates fully with an 'Args' section that explains path must be absolute, content is text, and host_name is a named host from SSH_HOSTS config with default behavior. This adds meaning well beyond the raw schema.

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

Purpose5/5

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

The description clearly states the tool's function with a specific verb and resource: 'Write content to a remote file (overwrites existing content).' The explicit mention of overwriting distinguishes it from sibling tools like append_file, making the purpose unambiguous.

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

Usage Guidelines4/5

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

The description provides clear context for when to use the tool—when you want to write or overwrite a file, and it mentions that parent directories are created. However, it does not explicitly state when not to use it or mention alternatives like append_file for preserving existing content.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zhouxiangjing/mcp-ssh'

If you have feedback or need assistance with the MCP directory API, please join our Discord server