Skip to main content
Glama

read_file

Read the contents of a remote file over SSH. Specify the file path and optionally limit lines or choose a named host.

Instructions

Read the content of a remote file.

Args: path: Absolute path to the file (e.g., "/etc/nginx/nginx.conf"). max_lines: Maximum number of lines to return (default 200, 0 = unlimited). host_name: Named host from SSH_HOSTS config; uses default host if omitted.

Returns: File content as text.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
host_nameNo
max_linesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It explains the return format and parameter defaults but does not mention error handling (e.g., missing file, permissions) or any side effects. It provides basic transparency but lacks depth on failure modes.

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 well-structured with clear Args and Returns sections. Every sentence provides useful information without redundancy, and the formatting makes it easy to scan quickly.

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?

For a simple file-reading tool with 3 parameters and an output schema, the description is nearly complete. It covers parameters, return value, and the optionality of host_name. It lacks edge-case behavior (e.g., file not found) but is otherwise sufficient for an agent to invoke the tool correctly.

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 Args section explains each parameter with examples and defaults, fully compensating for the 0% schema coverage. It clarifies that host_name is optional and defaults to the configured host, and that max_lines=0 means unlimited, adding meaning beyond the schema's raw type definitions.

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 tool reads the content of a remote file, using the specific verb 'read' with a clear resource. It distinguishes itself from sibling tools like write_file, delete_file, and tail_log by focusing on full file content reading, including an absolute path requirement.

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?

The description implies usage for reading a remote file's content but does not explicitly state when to prefer this over alternatives like tail_log or grep_file. It lacks clear exclusions or alternative guidance, so the usage context is only inferred from the tool's purpose and parameters.

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/zhouxiangjing/mcp-ssh'

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