Skip to main content
Glama

ssh_get_file

Read a file from a Linux host via SSH using an ephemeral credential. Returns content as text, or base64 if the file is not valid UTF-8.

Instructions

Read a file from a Linux host via SSH with an ephemeral credential. Returns the content as text, or base64 (base64=true in the result) when the file is not valid UTF-8. REQUIRES allow_file_transfer=true on the host (see ssh_list_servers); if false DO NOT retry, the signer will reject it. The read runs as the host's configured SSH user (no sudo); the file must be readable by that user. A file larger than max_bytes (default: the broker's file_transfer_max_bytes, 512 KiB) is an ERROR, not a truncation. The content's sha256 is recorded in the audit log.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesabsolute path of the file to read on the host
serverYeslogical name of the target host (see ssh_list_servers)
max_bytesNoread at most this many bytes; a larger file is an error, not a truncation. Omit for the broker's configured limit.
ttl_secondsNoephemeral certificate validity in seconds; omit to use the maximum allowed by the host policy

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
sizeYesfile size in bytes (decoded)
base64Yestrue when content is base64-encoded because the file is not valid UTF-8 text
serialYesaudit identifier; ignore when reasoning about the result
sha256Yeshex sha256 of the file content, recorded in the audit log
contentYesfile content: text as-is, or base64 when base64=true (binary file)
warningsNoadvisory command-policy warnings
Behavior5/5

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

Without annotations, the description fully discloses behavior: ephemeral credentials, base64 return for non-UTF-8 files, error (not truncation) for files exceeding max_bytes, and sha256 audit logging. It also warns that the signer will reject if allow_file_transfer is false.

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 compact paragraph of five sentences, each delivering critical information without redundancy. It is front-loaded with the core action and efficiently covers prerequisites, behavior, and error handling.

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 the tool's moderate complexity (4 parameters, no annotations, presence of output schema), the description covers prerequisites, error conditions, return format, and audit logging. It leaves no significant gaps for an agent to understand proper usage.

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?

Schema coverage is 100%, and the description adds valuable context: path must be absolute, server is logical name, max_bytes broker default is 512 KiB, and omitting ttl_seconds uses host policy maximum. This enriches the schema definitions.

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 'Read a file from a Linux host via SSH with an ephemeral credential', specifying the action, resource, and method. It distinguishes from siblings like ssh_execute and ssh_put_file by focusing on file reading and clarifying that writes are handled by ssh_put_file.

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

Usage Guidelines5/5

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

Explicit guidance is provided: the tool requires allow_file_transfer=true on the host, and if false, the agent should not retry. It also notes that the read runs as the configured SSH user (no sudo), implying that files must be readable by that user. These directives help the agent choose appropriately.

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