Skip to main content
Glama

Read File

read
Read-only

Open a text file with line numbers, specifying start and end lines to inspect exact content. Avoids re-reading files after modifications unless final content is required.

Instructions

Read a specific text file with line numbers. Avoid rereading files after write/edit/apply_patch 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 bytes returned in this page. Capped by the server and MCP response limits.
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 mark readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description adds that output includes line numbers and counsels against redundant rereads, which is useful but modest behavioral context; no pagination or encoding behavior is disclosed.

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?

Two sentences with no filler. The purpose and the key usage caveat are front-loaded in a compact, easily parsed form.

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?

All five parameters are documented in the schema, annotations cover safety, and the description adds the one non-obvious operational tip about avoiding redundant rereads. There is no output schema, but mentioning line numbers gives a rough return-format expectation; minor omissions like pagination behavior are inferable from max_bytes and start_line parameters.

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 covers 100% of parameters with descriptions, so baseline is 3. The description adds no parameter-specific detail beyond 'text file' and line numbers; start_line, end_line, max_bytes, and workspace_id semantics live in the schema.

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?

Description opens with 'Read a specific text file with line numbers,' identifying the verb, resource, and output format. It clearly distinguishes itself from sibling tools like write/edit and read_image by restricting scope to text files.

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?

Gives explicit when-not guidance: avoid rereading after write/edit/apply_patch unless exact final content is needed. It does not explicitly name alternative listing/search tools, but the text-file scope and read-only safety make the intended use clear.

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/Nippori709/AgentDock'

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