Skip to main content
Glama

ssh_get_file

Read-only

Read a file from a Linux host via SSH using ephemeral credentials. Returns content as text or base64; requires host to allow file transfer and file to be readable by the SSH user.

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?

Beyond annotations (readOnlyHint=true), describes result encoding (text/base64), max_bytes error not truncation, and sha256 audit logging. 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?

Single paragraph efficiently covers main purpose, conditions, and details without excess. Slightly dense but 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?

Complete for a read tool: prerequisites, error handling, user context, result format, and audit logging. Output schema covers return values.

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 covers 100% of parameters with descriptions; description adds context like 'no sudo' for path and 'logical name' for server, but schema already provides good baseline.

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?

Clearly states 'Read a file from a Linux host via SSH' with specific verb and resource, distinguishing it from sibling tools like ssh_execute or 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?

Explicitly describes when to use (read file) and when not to retry (if allow_file_transfer=false). Also notes read runs as configured SSH user without sudo and file size limit as error.

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