Skip to main content
Glama

ssh_put_file

Destructive

Write or overwrite a file on a Linux host via SSH using an ephemeral credential, with support for binary content via base64.

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?

Annotations indicate destructiveHint=true, and the description adds extensive context: overwrite behavior, no sudo, execution as configured user, command policy restrictions, size limit, and audit logging. It fully discloses side effects and constraints beyond what annotations provide.

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 a single dense paragraph with every sentence providing essential information: overwrite behavior, binary handling, host requirement, permission constraints, policy checks, size limit, and audit. Length is appropriate for the tool's complexity.

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?

The description covers prerequisites, permission model, policy constraints, size limits, and audit side effects. It fully contextualizes the tool's behavior, and with an output schema present, return value details are not necessary.

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%, with each parameter already described clearly. The description reinforces the content_base64 semantics and mentions the size limit affecting content, but does not add substantial new meaning beyond the 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: writing a file to a Linux host via SSH with an ephemeral credential. It explicitly mentions creates/overwrites behavior and is distinct from siblings like ssh_get_file (reading) and ssh_execute (running commands).

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?

Provides explicit prerequisites (allow_file_transfer=true, command policy, writable destination, size limit) and instructs not to retry if the flag is false. It references ssh_list_servers for verification but does not explicitly contrast with alternatives like ssh_get_file for the reverse operation.

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