Skip to main content
Glama

read_file

Read-only

Read the contents of a project file by path, relative to the project root or working directory. Use it to inspect source code, configuration, or artifacts and return content or an error.

Instructions

Read a file at path (relative to PROJECT_MCP_ROOT or cwd). Returns content or error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

readOnlyHint=true already tells the agent this is a safe read. The description adds two useful behavioral facts the annotation doesn't cover: path resolution scope (PROJECT_MCP_ROOT or cwd) and that errors are returned rather than thrown. That's modest added value, hence 3.

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?

One tight sentence front-loads the action, the argument, and the resolution rule, then the return behavior. No padding, nothing repeated from annotations.

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?

An output schema exists, so return shapes needn't be re-explained; the description still notes content-or-error. For a single-parameter read tool this is essentially complete, with only the lack of sibling routing guidance as a minor gap.

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?

There is a single parameter with 0% schema description coverage, so the description must carry the burden — and it does by explaining that 'path' is resolved relative to PROJECT_MCP_ROOT or cwd. That's the key semantic an agent needs and it's absent from the schema itself.

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 (a file at path) and clarifies the path base (PROJECT_MCP_ROOT or cwd). It doesn't explicitly contrast with siblings like write_file or edit_file, but the read intent is unambiguous against them.

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 (any time file content is needed) and gives the path-resolution context, but it names no alternatives or exclusions relative to sibling read/write tools. Usage is inferable rather than stated.

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