Skip to main content
Glama
tim-akkio

MCP Server Framework

by tim-akkio

read_file

Read text file contents with configurable line limits for file operations within Claude Code and Claude Desktop environments.

Instructions

    Read contents of a text file.

    Requires MCP_ALLOWED_PATHS to be configured with permitted directories.

    Args:
        path: File path to read
        max_lines: Maximum number of lines to return (default: 100)

    Returns:
        File contents or error message
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
max_linesNo

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 of behavioral disclosure. It effectively communicates: 1) the read-only nature (implied by 'Read'), 2) a security constraint (MCP_ALLOWED_PATHS requirement), 3) a performance/limitation behavior (max_lines default of 100), and 4) error handling (returns error message). This covers key behavioral aspects for a file reading operation.

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 well-structured and appropriately sized. It begins with the core purpose, then provides prerequisite information, followed by clear parameter documentation, and finally return value information. Every sentence earns its place, with no redundant or unnecessary content. The formatting with clear sections enhances readability.

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 that there's an output schema (though not shown here), the description doesn't need to fully explain return values. It provides sufficient context for a file reading operation: purpose, prerequisites, parameters, and basic return information. However, it could be more complete by mentioning encoding considerations or whether binary files are supported, which might be relevant for a file reading tool.

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

Parameters5/5

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

With 0% schema description coverage, the description fully compensates by providing clear parameter documentation in the Args section. It explains both parameters: 'path' as 'File path to read' and 'max_lines' as 'Maximum number of lines to return (default: 100)'. This adds essential meaning beyond the bare schema, including the default value and purpose of each parameter.

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 clearly states the tool's purpose with 'Read contents of a text file' - a specific verb (read) and resource (text file). However, it doesn't distinguish this from sibling tools like 'get_file_info' or 'list_directory', which also work with files but serve different purposes. The description is clear but lacks sibling differentiation.

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?

The description provides some usage context with 'Requires MCP_ALLOWED_PATHS to be configured with permitted directories' - this indicates a prerequisite condition. However, it doesn't explicitly state when to use this tool versus alternatives like 'get_file_info' (which might provide metadata without reading content) or 'list_directory' (which lists files rather than reading them). The guidance is implied rather than explicit.

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/tim-akkio/mcp-server'

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