Skip to main content
Glama

read_text_file

Reads the full contents of one UTF-8 text file up to 65,536 bytes from configured read roots, without modifying it. Use it when you need a complete small file in a single read.

Instructions

Read one whole UTF-8 text file (up to 65536 bytes) inside the configured Owner read roots, with no approval window. Use this as the default when you need the full contents of one file that fits the byte limit. For larger files use read_text_page (forward pagination) or read_text_chunk (tail / resume); for a few specific lines use read_text_lines; for several small files at once use read_many_text_files. Read-only: never modifies the file. Contents may be sensitive; share only what the task needs.

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_text_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesPath to the target within the already-configured Owner read/edit roots; path alone grants no access.
max_bytesNoMaximum UTF-8 file bytes, 1 to 65536; default 65536.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it declares read-only semantics, the hard byte ceiling, absence of an approval window, and a sensitivity handling note. It does not cover failure behavior (non-UTF-8 content, oversized file rejection) or encoding fallbacks, which would round out the behavioral picture.

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?

Lead sentence front-loads what it does and its constraints; subsequent sentences dispatch to alternatives and add a safety note. Every sentence earns its place with no restatement of the name.

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 an output schema exists, return values need no explanation, and the description covers limits, root confinement, and sibling routing adequately for a two-parameter read tool. Only error/edge-case behavior for unreadable or non-UTF-8 inputs is unaddressed.

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 coverage is 100%, so baseline is 3, but the description adds real meaning by tying the byte limit to the choice among sibling tools and reiterating that path alone grants no access beyond the configured roots. The max_bytes default and range are left to the schema.

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?

States a specific verb and resource ('Read one whole UTF-8 text file') plus concrete scope: 65536 bytes, confined to configured Owner read roots, no approval window. This is instantly distinguishable from pagination, line-range, and batch siblings.

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?

Explicitly designates itself as the default for full single-file contents that fit the byte limit, then routes to read_text_page, read_text_chunk, read_text_lines, and read_many_text_files by condition (larger, tail/resume, specific lines, several files). Both when-to-use and when-to-use-something-else are stated.

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