Skip to main content
Glama

read_file

Access and extract file contents directly using specified paths; optionally retrieve the first or last N lines for efficient file handling. Part of the MCP server for robust filesystem operations.

Instructions

Read the complete contents of a file as text. DEPRECATED: Use read_text_file instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
headNoIf provided, returns only the first N lines of the file
pathYes
tailNoIf provided, returns only the last N lines of the file
Behavior3/5

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

With no annotations provided, the description carries full burden. It states the basic operation but doesn't disclose behavioral aspects like file size limits, encoding handling, error conditions, or performance characteristics. The deprecation warning is valuable context but doesn't cover operational behavior.

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, zero waste. The first sentence states the purpose, the second provides critical deprecation guidance. Every word earns its place and the most important information (deprecation) is appropriately positioned.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a file reading tool with 3 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain return format, error handling, or the relationship between 'complete contents' and the head/tail parameters. The deprecation warning is helpful but doesn't compensate for missing operational context.

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 67% (2 of 3 parameters described). The description mentions 'complete contents' which contradicts the optional head/tail parameters that allow partial reading. This creates confusion rather than adding semantic value beyond what the schema provides.

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 the specific action ('Read the complete contents') and resource ('a file as text'), distinguishing it from siblings like read_media_file or read_multiple_files. The deprecation notice further clarifies its relationship to read_text_file.

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 explicitly states when NOT to use this tool ('DEPRECATED: Use read_text_file instead'), providing clear alternative guidance. This directly addresses the agent's decision-making between this deprecated tool and its replacement.

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

Related 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/Nexus-Digital-Automations/mcp-filesystem-updated'

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