Skip to main content
Glama

Read a file

read_file
Read-onlyIdempotent

Access a text file's contents, honoring the path allowlist and file size cap. Safely retrieve file data for further processing.

Instructions

Read a text file's contents (capped at MACCTL_MAX_FILE_BYTES). Honours the path allowlist.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesFile path (supports ~ for home).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, covering safety. The description adds the size cap and path allowlist, which are behavioral constraints not in annotations, providing additional transparency without contradiction.

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 concise sentences, with the action front-loaded and constraints following. No filler or redundant information.

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 simple read operation, the description, combined with full schema coverage and annotations, covers the essential behavior. It could mention return format or error cases, but these are not critical given the tool's simplicity and the existing structured data.

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% for the single parameter, with 'path' already described as supporting '~'. The description adds no further parameter semantics, so the baseline of 3 applies per the rubric.

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 verb 'read' and the resource 'text file', with additional constraints (size cap, allowlist) that distinguish it from sibling file operations like write_file or delete_path. It is specific and unambiguous.

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?

The description implies usage for reading file contents, and the allowlist constraint hints at permitted paths, but it does not explicitly contrast with alternatives or state when not to use it. Given the simplicity and obvious sibling distinctions, this is clear context without explicit exclusions.

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