Skip to main content
Glama

Read a file

read_file
Read-onlyIdempotent

Read text file contents from allowlisted paths, enforcing a size cap for safe Mac file observation.

Instructions

Read a text file's contents (capped at MACOS_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 establish read-only, idempotent, non-destructive behavior, so the description adds value by disclosing the size cap and the path allowlist constraint. It could say more about what happens on allowlist failure or oversize files, but it covers the key behavioral traits beyond annotations.

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, each carrying necessary information: what is read, the cap, and the allowlist. No filler, front-loaded with the primary action.

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 single-parameter, read-only tool, the description covers the essential constraints: target is a text file, capped size, and allowlist requirement. It does not detail error behavior or return format, but the operation is simple enough that the description is largely sufficient.

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?

The schema's parameter description already covers path syntax including '~'. The tool description adds that the path must correspond to a text file and must be allowlisted, which are meaningful constraints on the parameter's accepted values.

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 names the exact verb and resource: 'Read a text file's contents', which is more specific than the title and distinguishes it from sibling tools like list_directory and get_clipboard. It also adds two scope constraints (byte cap and allowlist) that define what this tool does.

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 description implies when to use it: when you need a text file's contents. However, it does not explicitly state when not to use it or name alternatives; the allowlist mention hints at a prerequisite but no exclusions are given.

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