Skip to main content
Glama

ssh_read_file

Read a specific range of lines from a remote file via SSH, using offset and limit parameters to efficiently retrieve only the needed portion.

Instructions

Read lines from a file on the remote server.

Efficiently reads only the requested range using sed, so large files are safe to read partially. Returns line-numbered content similar to cat -n output.

Args: path: Absolute or relative path to the file on the remote. offset: Line number to start reading from (0-based). limit: Maximum number of lines to return. host: SSH host alias from config. Uses default if omitted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
offsetNo
limitNo
hostNo
Behavior4/5

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

No annotations are present, so the description carries full burden. It discloses the use of sed for efficient range reading and the return format (line-numbered like `cat -n`). It does not cover error handling, but for a read operation, this is sufficient.

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 concise with no wasted words. It uses a clear structure: a one-line purpose statement, a brief efficiency note, and a clean bulleted Args list. Every sentence adds value.

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

Completeness4/5

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

Given the tool's simplicity (4 params, no output schema, many siblings), the description adequately covers what the tool does and how to use it. It does not explain edge cases (e.g., missing file), but it is complete enough for an efficient read tool.

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?

The input schema has 0% description coverage, but the description's Args section fully explains all four parameters: path (path description), offset (0-based, default 0), limit (max lines, default 2000), host (optional, uses default). This adds significant 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 action ('Read lines') and resource ('file on the remote server'). It distinguishes itself from siblings like ssh_write_file and ssh_append_file by specifying reading behavior and efficiency with partial ranges.

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?

The description provides guidance on when to use the tool ('large files are safe to read partially') and mentions default host behavior. It lacks explicit when-not-to-use or alternative tools, but the context of efficient partial reading 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/mkavinkumar1/ssh-mcp'

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