Skip to main content
Glama

sftp_read_file

Read a remote file over SFTP with line range slicing and SHA-256 checksum verification to confirm content integrity.

Instructions

Safely read remote file with line range slicing (startLine/endLine) and SHA-256 integrity checksum.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetNoOptional SSH connection target. If omitted, uses default profile (homelab).
endLineNo1-indexed ending line.
filePathYesAbsolute remote file path.
maxBytesNoMax bytes to read.
startLineNo1-indexed starting line.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.3/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 burden. It does disclose two real behavioral traits — the line-range slicing model and SHA-256 integrity verification ('safely') — which are not in the schema. However it omits truncation behavior when maxBytes is hit, encoding assumptions, and error semantics for missing files or auth failure, leaving material gaps for a read tool.

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?

One sentence, front-loaded with the core action, with the differentiating features attached rather than buried. No filler or redundancy.

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?

No output schema exists, so the description should at least sketch the return shape; it only implies a checksum is returned. For a 5-param tool with a nested connection target, the absence of any return-value or error-handling detail leaves a moderate gap, though the schema itself is fully described.

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 description coverage is 100%, so host/port/profile/privateKeyPath/filePath/startLine/endLine/maxBytes are already documented. The description only restates startLine/endLine in parentheses and adds no syntax, ordering, or interaction rules (e.g., how maxBytes interacts with endLine). Baseline 3 is appropriate.

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 and resource ('read remote file') plus its distinctive features (line-range slicing, SHA-256 checksum). It clearly separates itself from write-oriented siblings like sftp_write_safe and sftp_list_dir, though it never names an alternative explicitly.

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?

No when-to-use guidance, no mention of prerequisites, and no routing to alternatives such as sftp_list_dir or sftp_read variants. The agent gets no signal about when this tool is preferred over ssh_exec for reading content.

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