Skip to main content
Glama

read_file

Read-onlyIdempotent

Read text files with line numbers, resolve relative paths against the default workspace, and use startLine/endLine to inspect large files.

Instructions

Read a text file with line numbers. Relative paths resolve against the default workspace. Use startLine/endLine for large files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesFile path
endLineNo
startLineNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the safety profile is covered. The description adds real value beyond that: relative paths resolve against the default workspace, and output includes line numbers. It doesn't disclose error behavior for missing files, but for a read tool this is solid.

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?

Three short sentences, zero filler, and the core action is front-loaded. The path-resolution and large-file hints follow in priority order.

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?

No output schema exists, yet the description conveys the key return characteristic (line numbers) and the path-resolution rule. For a simple 3-param read tool that is close to complete, with only edge-case semantics (out-of-range lines, missing file) left unstated.

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 coverage is only 33% — only 'path' is documented as 'File path'. The description compensates partially by naming startLine/endLine and tying them to large files, but it doesn't clarify indexing base, inclusivity of endLine, or what happens when omitted. Baseline 3 fits given the partial compensation.

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?

The description gives a specific verb and resource ('Read a text file') plus an output trait ('with line numbers'), which cleanly separates it from write_file, edit_file, and read_many_files. It stops short of naming the sibling it differs from (read_many_files for multi-file reads), so it isn't a full 5.

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?

It offers one usage hint — 'Use startLine/endLine for large files' — which is genuinely actionable, but there is no guidance on when to choose this over read_many_files or file_info, and no stated preconditions. Usage is implied rather than articulated.

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

Deploy Server

Other Tools