Skip to main content
Glama

read_file

Read-onlyIdempotent

Read an allowed text file or line range to retrieve content for local development and automation.

Instructions

Read an allowed text file or line range.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
end_lineNo
start_lineNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.2

TDQS

B3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and closed-world scope, so the safety profile is covered. The word 'allowed' hints at an allowlist/deny behavior but never states what happens on a disallowed path, and encoding/binary handling is unaddressed.

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 padding. It is efficient, though arguably under-specified rather than maximally concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be described, and annotations cover safety. Still, with three parameters at 0% schema coverage, the description leaves the line-range contract and the 'allowed' restriction undefined for an agent to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across three parameters, so the description carries the burden — but it only obliquely gestures at 'line range'. It never clarifies whether start_line/end_line are inclusive, whether both must be supplied, or what counts as an allowed path.

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 concrete verb ('Read') and resource ('text file') plus an optional line-range mode, which is enough for an agent to distinguish it from list_directory, search_code, and apply_patch. It stops short of naming siblings or comparing to search_code for content lookup.

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

Usage Guidelines2/5

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

No when-to-use context and no exclusions: nothing tells the agent when to prefer read_file over search_code or shell, nor whether a line range is required versus optional. The only usage signal is the implied 'allowed' restriction.

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