Skip to main content
Glama

sftp_read

Read a remote file in chunks over SFTP to page through large files with offset and limit, returning UTF-8 text or exact base64 bytes.

Instructions

Read part of a remote file. Use offset and next_offset to page through it. encoding=utf8 avoids splitting a character; encoding=base64 returns exact bytes.

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": {
      "path": "<path>"
    },
    "name": "sftp_read"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesRemote file path to read
limitNoMaximum bytes to read, default 25000
offsetNoByte offset to start reading, default 0
timeoutNoAbort this SFTP operation if it makes no progress for this many milliseconds
encodingNoutf8 or base64, default utf8
session_idNoSession ID (optional if using pre-configured server)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses that this is a partial read and explains encoding effects, but it omits error behavior, whether reads beyond EOF fail or return empty, and permission/session requirements.

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?

Three short sentences with the core purpose front-loaded and no wasted wording. The only blemish is the unsupported next_offset reference, which is more a correctness issue than verbosity.

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

Completeness3/5

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

For a six-parameter read tool with no annotations or output schema, the description covers paging and encoding but leaves gaps around session_id, timeout behavior, and end-of-file semantics. The non-existent next_offset parameter is a notable completeness flaw.

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 100%, so the baseline is 3. The description adds meaningful encoding semantics (utf8 avoids splitting characters; base64 returns exact bytes), but its reference to next_offset does not correspond to any schema parameter, slightly undermining the added value.

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 states a specific verb and resource ('Read part of a remote file'), which is clear enough to distinguish it from write/delete siblings. It does not explicitly differentiate from sftp_download, so an agent must infer that download retrieves a whole file while this reads slices.

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?

It gives paging guidance ('Use offset and next_offset to page through it'), but next_offset is not a parameter in the schema, making the advice partially misleading. There is no guidance on when to use this instead of sftp_download or when a full download is preferable.

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