Skip to main content
Glama

read-file

Read file contents from a remote SSH server, supporting partial file reading and sudo privileges for secure access.

Instructions

Read contents of a file from the remote server

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath to the file to read
connectionNameNoSSH connection name (optional, default is 'default')
maxLinesNoMaximum number of lines to read (optional, reads entire file if not specified)
startLineNoLine number to start reading from (optional, 1-indexed, default is 1)
sudoNoRead file with sudo privileges (optional, default is false)
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool reads file contents but doesn't mention potential side effects (e.g., whether it logs access, requires authentication, or has rate limits), error handling (e.g., what happens if the file doesn't exist), or output format (e.g., text, binary). This leaves significant gaps for a tool with remote server access.

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, efficient sentence that directly states the tool's purpose without unnecessary words. It's front-loaded with the core action ('Read contents'), making it easy to parse, and every part of the sentence contributes to understanding the tool's function.

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

Completeness2/5

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

For a tool with 5 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what the tool returns (e.g., file content as text, error messages), behavioral constraints (e.g., file size limits, encoding issues), or how it interacts with sibling tools. Given the complexity and lack of structured data, more detail is needed for effective use.

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?

The description doesn't add any parameter-specific information beyond what's already in the schema, which has 100% coverage with clear descriptions for all 5 parameters. Since the schema fully documents parameters like 'path', 'maxLines', and 'sudo', the description meets the baseline but doesn't provide extra context (e.g., typical use cases for 'sudo' or line numbering conventions).

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

Purpose4/5

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

The description clearly states the action ('Read contents') and resource ('a file from the remote server'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'download' or 'upload', which also involve file operations but with different purposes.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'download' (which might retrieve files) or 'write-file' (which modifies files). There's no mention of prerequisites, such as needing an established connection or file permissions, leaving usage context unclear.

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/ZachFlint/ssh-mcp-server'

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