Skip to main content
Glama

read_file

Reads file contents from local storage, with options to specify a line range (1-based) and encoding (utf8, base64, or hex). Useful for accessing specific portions of a file.

Instructions

Read file contents. Supports line range (1-based).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesFile path.
encodingNoEncoding: utf8|base64|hex. Default: utf8.
end_lineNoLast line (1-based, inclusive).
start_lineNoFirst line (1-based).

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are provided, so the description carries the behavioral burden. It states the basic behavior and line-range support, but does not mention error behavior, encoding output semantics, file-size limits, or return format. This is adequate for a simple read operation but leaves notable gaps.

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 sentences with no filler. The core action is front-loaded and the line-range qualification is immediately useful, so every word earns its place.

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 simple tool with fully documented parameters, the description covers the core action and line-range capability. However, with no output schema and no annotations, it does not explain return value shape, error behavior, or encoding output semantics, leaving some ambiguity for an agent.

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 coverage is 100% with each parameter described, so the baseline is 3. The description recaps line-range support but adds no meaning beyond the schema's existing start_line/end_line descriptions.

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 action ('Read file contents') and the resource, and the line-range mention adds a specific capability. This distinguishes read_file from siblings like write_file, append_file, and get_file_info at a glance.

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

Usage Guidelines2/5

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

No guidance is given for when to use this tool versus alternatives such as get_file_info, file_exists, or search_files. The line-range comment implies a partial-read use case, but there are no explicit conditions, prerequisites, or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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/YOUSEFISLAM-dev/qwen-mcp'

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