Skip to main content
Glama

read_file

Read-onlyIdempotent

Reads UTF-8 text from an approved local root, truncating large files at a byte limit with a clear marker. Use it to inspect file contents after locating paths; read-only and no binary support.

Instructions

Read text from an approved local root as UTF-8, truncating at MAX_READ_BYTES (512 KB by default) with a clear truncation marker. Use search_files first to locate passages; binary files are not supported. Read-only.

Input Schema

NameRequiredDescriptionDefault
pathYesRelative file or directory path inside the approved root.
rootYesName of a configured approved root returned by list_roots.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, closed-world, non-destructive, so the safety profile is free. The description adds genuinely non-obvious behavior beyond that: a concrete truncation ceiling (512 KB default) with a visible truncation marker, UTF-8 decoding assumptions, and binary rejection. It omits error semantics for missing paths or oversized files, keeping it out of the top band.

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 tight sentences with zero filler: the capability and truncation behavior come first, then the alternative routing and exclusion. Every clause carries information an agent needs before calling.

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?

With no output schema, the description usefully characterizes the return value as UTF-8 text with an explicit truncation marker, which is the key thing an agent needs to interpret results. For a two-parameter read tool with full annotation coverage this is nearly complete; error behavior on unreadable paths is the only notable omission.

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%, so both 'root' and 'path' are already documented, and no enum constraints exist. The description reinforces the notion of an 'approved local root' but adds no new syntax, format, or constraint information about the two parameters beyond the schema, so the 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 text from an approved local root') with concrete scope modifiers: UTF-8 decoding, MAX_READ_BYTES truncation, and rejection of binary files. It separates itself from search_files by telling the agent to locate passages there first, but does not distinguish itself from file_info or list_files, which are the closest competing reads.

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

Usage Guidelines4/5

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

'Use search_files first to locate passages' gives explicit routing to a sibling, and 'binary files are not supported' is a clear exclusion. It stops short of full when/when-not coverage: it never says when to prefer file_info (metadata only) over read_file, nor what to do when a file is large or missing.

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

Deploy Server

Other Tools