Skip to main content
Glama

read_file

Reads a text file in bounded chunks, returning up to 800 lines or 46,080 bytes and supporting optional start/end line and byte offset.

Instructions

Read a text file. Each call returns at most 800 lines or 46080 bytes.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "Path": "<Path>"
    },
    "name": "read_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
PathYesAbsolute path of the file.
EndLineNoLast line to read, inclusive.
StartLineNoFirst line to read, starting at 1.
ByteOffsetNoByte offset into the selected text.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior3/5

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

No annotations, so description carries full burden; it usefully discloses truncation limits (800 lines / 46080 bytes), which is key behavior for a read tool. But it does not say what happens when a file is truncated, how to continue reading (ByteOffset/StartLine), binary files, or error 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 short sentences, front-loaded with the verb and the critical size constraint. Nothing wasted.

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?

Output schema exists so return values needn't be explained, and schema covers params fully. But with no annotations, the description should mention read-only safety, permission requirements, and continuation strategy for truncated files.

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

Parameters2/5

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

Schema coverage is 100%, so baseline 3; however the description adds nothing about how StartLine/EndLine/ByteOffset interact with the line/byte caps — a real semantic gap since offsets and limits jointly determine return content.

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?

Specific verb+resource: "Read a text file." Clearly a read operation on a file, distinguishable from siblings write_file/edit_file. No explicit sibling differentiation though.

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 when-to-use guidance, no mention of alternatives like grep_search for searching or run_command for shell reads, no prerequisites noted. Only chunking limits are stated.

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