Skip to main content
Glama

read_text_file

Read-only

Reads UTF-8 text files from approved paths while enforcing configured size limits, so clients can safely inspect allowed workspace content.

Instructions

Read a UTF-8 file within configured size limits

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
pathYesAbsolute path under configured approved roots

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=false, so safety is covered structurally. The description adds real behavioral context beyond them: the file must be UTF-8 and the read is bounded by a configured size limit, meaning calls can fail on encoding or size rather than silently truncating.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no filler or redundancy. It is efficient, though the phrase "configured size limits" is underspecified enough that it nearly costs a point.

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?

For a one-parameter read tool with full schema coverage and annotations covering the safety profile, this is nearly enough. The remaining gap is failure behavior on oversized or non-UTF-8 files (error versus truncation), which an agent must discover empirically.

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 100% and the single path parameter already documents "Absolute path under configured approved roots". The description adds no further meaning such as path resolution, symlink behavior, or relative-path rejection, so baseline 3 applies.

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?

States a specific verb and resource ("Read a UTF-8 file") plus a scope constraint on size. It does not name the sibling it is not, so an agent still has to infer that read_lines is the ranged alternative and write_text_file is the inverse, but the purpose itself is unambiguous.

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 "within configured size limits" clause only implies when to use this versus read_lines (i.e. whole-file, small files), and "configured" gives no concrete threshold. No explicit when-not or alternative is stated, so usage is left to inference.

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