Skip to main content
Glama

Read File

read
Read-only

Read a file's content with line numbers, optionally specifying start and end lines to view targeted sections.

Instructions

Read a specific text file with line numbers. Avoid rereading files after write/edit unless exact final content is needed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesFile path relative to workspace root.
end_lineNoLast line to read. Default: end of file.
max_bytesNoMaximum file bytes. Capped by server config.
start_lineNoFirst line to read. Default: 1.
workspace_idNoWorkspace id from open_workspace. Omit to use default workspace.
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, covering the safety profile. The description adds the 'line numbers' output detail and the 'avoid rereading' advice, which provides some context beyond the annotations. However, it does not disclose operational behavior such as pagination, handling of large files, or workspace-specific constraints. With annotations present, the description's additional context is useful but not rich, so 3 is appropriate.

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 two sentences with zero filler. The core purpose ('Read a specific text file with line numbers') is front-loaded, and the usage guideline follows immediately. Every word adds value, making it an ideal length for an agent to parse quickly.

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

Completeness5/5

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

Despite having no output schema, the description is complete for a tool of this simplicity. It covers the essential action (read a file), the output feature (line numbers), and a key efficiency guideline. The schema covers parameter details, and annotations cover safety. There is nothing an agent needs to know to invoke this correctly that is missing, especially given the presence of rich sibling context (e.g., read_handoff) which the description implicitly avoids.

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 all five parameters (path, start_line, end_line, max_bytes, workspace_id) are already documented in the schema. The description does not add any further parameter-level semantics, such as edge cases, default behaviors, or relationships between parameters. Baseline 3 is thus correct when the schema carries the full parameter documentation.

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 a specific verb ('Read') and resource ('a specific text file') with an explicit output feature ('with line numbers'). This distinguishes it from sibling tools like search, write, and edit without needing to open the schema. The wording 'specific text file' implies it is not for listing or searching contents, making its purpose unmistakable.

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

Usage Guidelines4/5

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

The description provides an explicit when-not-to-use guideline: 'Avoid rereading files after write/edit unless exact final content is needed.' This gives the agent clear conditional logic for when to skip calling read. However, it does not explicitly name alternative tools (e.g., search, tree) or state when to prefer them, so it misses the full 'alternatives' part of the highest bar.

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/sedatustunova/S3dat-Relay'

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