Skip to main content
Glama

read_file

Need file content from a project? Read it with line ranges and size caps; binary files and paths outside the approved project are rejected.

Instructions

Read a file inside a project root, size-capped and line-ranged. Free local I/O — prefer over deep_explore for any file-content question. Refuses binary files and paths outside the approved project.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesFile path relative to a project root, or absolute inside a root.
limitNoMax lines to return (default 2000).
offsetNo1-indexed first line to return (default 1).
projectNoProject path the user named in chat (armed via init). Pass it explicitly on every call. If no project has been named, ask the user; never guess.
max_charsNoHard cap on returned characters (default 20000).
session_tokenNoSession token returned by init (or create_project). Required for every project tool call in this chat. A new chat must be re-armed.
redact_secretsNoRedact known secret patterns (default true).
Behavior4/5

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

With no annotations provided, the description fully carries the behavioral disclosure burden. It adds valuable context: 'Free local I/O' signals no side effects, 'size-capped and line-ranged' describes output limitations, and 'Refuses binary files' indicates error behavior. It could be more explicit about the consequences of hitting limits or error scenarios, but it covers the critical aspects of safety and scope.

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 short, information-dense sentences with no fluff. The first sentence states the core purpose and constraints; the second gives usage prioritization and refusal conditions. Every word contributes to understanding.

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 straightforward read operation without an output schema, the description covers the essentials: what it does, when to use it, and key limitations. It could mention error handling for missing files or encoding, but given the tool's simplicity and the coverage of parameters, it's sufficiently complete. The lack of an output schema is acceptable because the return value is obviously file content.

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 the term 'size-capped and line-ranged' which loosely relates to limit/offset/max_chars, but the parameter definitions already provide this clarity. No significant extra meaning is added beyond what the schema documents.

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 uses a specific verb and resource ('Read a file inside a project root') and immediately adds scoping details ('size-capped and line-ranged'). It also differentiates itself from the sibling tool by explicitly recommending itself 'over deep_explore for any file-content question', which directly addresses sibling distinction.

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

Usage Guidelines5/5

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

The description gives explicit usage guidance: 'prefer over deep_explore for any file-content question' names the alternative and clarifies when to use this tool. It also implies when not to use it ('Refuses binary files and paths outside the approved project'), covering both positive and negative cases.

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/psrisuphan/cheap-labor'

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