Skip to main content
Glama
szoran53
by szoran53

Read File

read_file
Read-only

Fetch the contents of a file at an absolute path on a Linux system, up to 1MB, to inspect configuration, logs, or source code.

Instructions

Read the contents of a file. Subject to 1MB output limit.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path to file

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description adds one useful constraint (1MB output limit), but says nothing about encoding, binary files, truncation behavior, or error cases such as missing paths.

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 with the purpose front-loaded and the constraint immediately after. Nothing is redundant or padded.

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?

With no output schema, the description should carry more of the return-value burden; it notes the 1MB limit but not what happens on truncation or how content is returned. Adequate but with clear gaps for a file-reading tool in a large filesystem-oriented toolset.

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% and the single 'path' parameter is documented as an absolute path in the schema. The description adds no further meaning, so the baseline 3 applies.

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 (contents of a file), which distinguishes it from write_file and delete_file. It does not, however, differentiate itself from near-siblings like tail_file or get_file_info, leaving the agent to infer boundary cases.

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 guidance on when to choose this over tail_file (last N lines), get_file_info (metadata), or list_directory. The agent must infer usage conditions from the name alone.

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