Skip to main content
Glama

Read a remote file

ssh_read_file
Read-only

Read a text file from a configured remote host over SFTP, starting at a byte offset and limiting bytes returned for bounded, paginated access.

Instructions

Reads a text file from a host over SFTP. Returns at most maxBytes starting at byte offset; the first line of the result says how much of the file was returned.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "host": "<host>",
      "path": "<path>"
    },
    "name": "ssh_read_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
hostYesName of a configured host, as returned by ssh_list_hosts
pathYesAbsolute path, or one relative to the login directory
offsetNoByte offset to start reading at
maxBytesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0-dev.1

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, so the safety profile is covered. The description adds genuinely non-obvious behavior: reads are byte-ranged and truncated at maxBytes, and the result is prefixed with a line reporting how much was returned. It omits error/failure semantics and encoding, which keeps it from a 5.

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?

Two sentences, no filler, with the read-window semantics front-loaded right after the purpose statement. Every clause carries information an agent needs.

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?

With no output schema, the description does the necessary work of telling the agent the return value carries a leading length line, so it can interpret results without guessing. For a 4-parameter read tool this is close to complete; only failure modes and text encoding are unaddressed.

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 75% and the description ties offset and maxBytes together into a single read-window concept ('at most maxBytes starting at byte offset'), which meaningfully compensates for maxBytes having no schema description. host and path are already fully documented in the schema, so overall this is the baseline-plus rather than a rich elaboration.

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?

States a specific verb, resource, and transport: 'Reads a text file from a host over SFTP.' That is enough to separate it from ssh_write_file and ssh_exec on the name and action alone, though it never explicitly contrasts itself with the siblings.

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

Usage Guidelines3/5

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

Usage is only implied — the word 'text' hints that binary content is out of scope, and the SFTP framing implies it is for file content rather than commands. There is no explicit when-to-use/when-not or pointer to ssh_exec or ssh_list_dir for other needs.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.