Skip to main content
Glama

ssh_put_file

Transfer and write files to a Linux host over SSH using an ephemeral credential. Supports text and binary content with automatic base64 decoding.

Instructions

Write a file on a Linux host via SSH with an ephemeral credential. Creates or OVERWRITES the destination file with the given content. Use content_base64=true for binary data (the content field is decoded before writing). REQUIRES allow_file_transfer=true on the host (see ssh_list_servers); if false DO NOT retry, the signer will reject it. The write runs as the host's configured SSH user (no sudo); the destination must be writable by that user. On hosts with a command policy the transfer command (cat > path) must also be allowed by the policy. Content is limited by the broker's file_transfer_max_bytes (default 512 KiB). The content's sha256 is recorded in the audit log.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNooptional octal permissions to chmod after writing, e.g. 0644 or 0755
pathYesabsolute destination path on the host; the file is created or overwritten
serverYeslogical name of the target host (see ssh_list_servers)
contentYesfile content. Text as-is, or base64 with content_base64=true for binary data.
ttl_secondsNoephemeral certificate validity in seconds; omit to use the maximum allowed by the host policy
content_base64Noif true, content is base64-encoded and is decoded before writing (required for binary files)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
serialYesaudit identifier; ignore when reasoning about the result
sha256Yeshex sha256 of the written content, recorded in the audit log
warningsNoadvisory command-policy warnings
bytes_writtenYesnumber of bytes written to the remote file
Behavior5/5

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

With no annotations, the description discloses full behavior: ephemeral credential, create/overwrite, binary support via content_base64, file size limit (512 KiB), audit logging of sha256, no sudo, host policy constraints. No contradictions.

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

Conciseness4/5

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

All sentences are necessary and informative. Front-loaded with core purpose. Could be slightly more concise but given complexity, it is well-structured.

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

Completeness5/5

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

Given output schema exists (not shown), description covers prerequisites, constraints, limitations, binary handling, and audit. Fully complete for the tool's purpose.

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

Parameters4/5

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

Schema coverage is 100% (baseline 3). Description adds meaning: explains content_base64 for binary, ttl_seconds defaults to max allowed, mode for octal chmod, and that the write uses 'cat > path' command. Adds value beyond 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 'Write a file on a Linux host via SSH with an ephemeral credential' and distinguishes from siblings like ssh_execute and ssh_get_file. Verb+resource is specific and 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?

It explicitly requires allow_file_transfer=true on the host and warns not to retry if false. It describes the user context (no sudo) and destination writability. Implicitly suggests ssh_list_servers to check. Does not explicitly name alternatives like ssh_execute for commands, but context is clear.

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/luisgf/infrabroker'

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