Skip to main content
Glama

read_file

Reads a UTF-8 text file from a sandboxed directory using a relative path, rejecting absolute paths and '..' to keep access safely scoped.

Instructions

Read a UTF-8 text file inside the sandbox directory. 'path' is relative to the sandbox root (e.g. 'notes/todo.md'). Absolute paths and '..' are rejected.

Input Schema

NameRequiredDescriptionDefault
pathYesFile path relative to the sandbox root

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description must carry the behavioral load, and it does disclose key constraints: UTF-8 only, sandbox-scoped, absolute paths and '..' rejected. It omits error behavior for missing files, size/encoding failure modes, and return shape, which matters given there is no output schema.

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 sentences, zero waste, with the core action and the hard constraint both front-loaded. Nothing could be cut without losing 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 one-required-parameter read tool with full schema coverage, this covers scope, encoding, and path rules adequately. The remaining gap is failure behavior (nonexistent file, permission, non-UTF-8 content), which is not addressed anywhere.

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 already 100%, so the baseline is 3; the description goes further by adding an example path format ('notes/todo.md') and explicitly stating that absolute paths and '..' are rejected, which is real meaning beyond the schema's 'relative to the sandbox root'.

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 (read) and resource (UTF-8 text file inside the sandbox directory), which cleanly separates it from write_file/list_dir in the sibling set. It stops short of explicitly naming or contrasting a sibling, so it sits just below the top band.

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?

Usage is only implied by the verb — nothing tells the agent when to prefer this over list_dir (to discover paths) or file_history/undo_write. The path constraints are stated, but there is no explicit when/when-not guidance.

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