Skip to main content
Glama
rj9884
by rj9884

read_file

Read a file's contents from your project by specifying its path. Optionally limit output to a specific line range for targeted inspection.

Instructions

Read the contents of a file in the project. Optionally limit output to a range of lines. Use list_files first if you are unsure of the file path.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
end_lineNoLast line to return (1-based, inclusive)
filepathYesPath to the file, relative to project root or absolute
start_lineNoFirst line to return (1-based, inclusive)
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses the read operation and the optional line-range limitation, but it does not mention error behavior (e.g., file not found), encoding, or whether the read is safe in terms of side effects. The range-limiting behavior is also already described in the schema, so the added transparency is minimal.

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 concise and front-loaded: the first sentence states the core purpose, the second adds the optional line-range feature, and the third gives practical path guidance. Every sentence earns its place; no redundancy or irrelevant details.

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 tool with 3 parameters and full schema coverage, the description is adequately complete. It implies the return value by saying 'Read the contents,' and it includes a helpful prerequisite tip. It does not explain failure modes or output format, but given the simplicity, a 4 is appropriate.

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 the baseline is 3. The description adds no new meaning for filepath, start_line, or end_line beyond the schema's definitions. The tip about using list_files is more of a usage guideline than parameter semantics, so it does not raise the score above baseline.

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 'Read the contents of a file in the project,' identifying the specific verb 'read' and resource 'file.' This unambiguously distinguishes from siblings like edit_file, delete_file, and list_files, and the word 'project' scopes the tool appropriately.

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 a clear usage guideline: 'Use list_files first if you are unsure of the file path.' This tells the agent when to invoke a predecessor tool, but it does not explicitly mention alternative tools like view_page or list exclusions, so it falls short of a full 5.

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/rj9884/universal-dev-mcp'

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