Skip to main content
Glama

read_file

Read text files up to 100KB from allowed directories to inspect source code, configuration files, or any file content without modifying system state.

Instructions

Reads the text contents of a file (capped at 100KB). Path must be within
allowed roots (~/Projects, ~/Documents).

Use this when investigating file contents, checking configuration files,
or reading source code. Does not modify system state.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses key behavioral facts: size cap (100KB), path root restrictions, and that it's a non-mutating operation. It does not mention error handling or binary file behavior, but the output schema likely covers return semantics. This is solid disclosure for a read tool.

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 concise sentences with no superfluous information. The key operation and limitations are front-loaded, and every clause adds value. Perfectly sized for the tool's simplicity.

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?

Given the complexity (single parameter) and the presence of an output schema, the description covers operational constraints, usage guidance, and safety. It doesn't address edge cases like binary files or symlink resolution, but these are minor for a basic read tool. Overall, sufficient for reliable invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the description adds meaningful constraint on the 'path' parameter (must be within allowed roots) and clarifies the file type (text). This compensates for the lack of schema docs and helps the agent construct a valid path.

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 states a specific verb ('Reads'), a resource ('text contents of a file'), and explicit constraints (cap at 100KB, path within allowed roots). This clearly distinguishes it from sibling tools like list_directory or get_file_metadata, which serve different purposes.

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?

It provides explicit use cases ('investigating file contents, checking configuration files, or reading source code') and notes that it does not modify system state. While it doesn't explicitly name alternatives or exclusion conditions, the usage context is clear enough for an agent to decide when to invoke it.

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/Ronit-k/MCPilot'

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