Skip to main content
Glama

remote_read

Read remote files by line range, returning line-numbered content for precise edits. Supports start/end lines and max byte limits.

Instructions

读取远端文件。支持按行区间读取,返回带行号以便后续精确修改。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes文件路径,相对路径基于 SSH_REMOTE_BASE,也支持 ~ 和绝对路径
endLineNo结束行号(含),不填则到尾
maxBytesNo最大读取字节数,默认 512KB
startLineNo起始行号(1 起),不填则从头

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the burden, and it does convey read-only semantics, line-range support, and that output carries line numbers for follow-up edits. However, it omits truncation behavior around maxBytes, error handling for missing/unreadable files, and encoding assumptions.

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?

Two short, front-loaded sentences with no filler; the core purpose leads and the line-number behavior follows. Slight overlap with schema-documented line-range params keeps it from a 5.

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 simple 4-param read tool with full schema coverage and no output schema, the definition is adequate. Gaps remain around encoding, binary files, and what a maxBytes-truncated result looks like, which an agent could need.

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 path, startLine, endLine, and maxBytes are already fully documented in the schema. The description only gestures at line-range reading without adding format or default details beyond what the schema provides; baseline 3 applies.

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 (读取远端文件 / read remote file) and adds scope (line-range reads) plus a distinguishing output trait (line numbers). It clearly reads content, separating it from remote_list/remote_stat/remote_exec, though it does not name the sibling it is not.

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 implied by '支持按行区间读取' (line-range reads) and the line-number return for later edits, but there is no explicit when-to-use/when-not or reference to alternatives like remote_search or remote_find for locating content first.

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