Skip to main content
Glama

read

Fetch text or image file contents; use line offset and limit to page through large files when output is truncated.

Instructions

Read the contents of a file. Supports text files and images (jpg, png, gif, webp, bmp). Images are sent as attachments. For text files, output is truncated to 2000 lines or 50KB (whichever is hit first). Use offset/limit for large files. When you need the full file, continue with offset until complete.

Input Schema

NameRequiredDescriptionDefault
pathYesPath to the file to read (relative or absolute)
limitNoMaximum number of lines to read
offsetNoLine number to start reading from (1-indexed)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does a solid job on a key trait: it discloses truncation limits (2000 lines or 50KB, whichever first) and that images arrive as attachments. It doesn't mention error behavior for missing/unreadable paths or binary-file handling, but the critical agent-facing behavior (silent truncation) is well disclosed.

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?

Four sentences, front-loaded with the core purpose, then format support, then the truncation constraint that matters most for correct use. Every sentence carries information; no filler.

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 three-parameter read tool with no output schema and no annotations, the description covers purpose, supported types, truncation behavior, and pagination strategy — enough to invoke correctly. Missing only edge-case behavior (errors, empty files), which is 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?

Schema description coverage is 100%, so the baseline is 3, and the description earns an extra point by explaining the offset/limit interaction and the recommended paging workflow beyond the schema's one-line field docs. It doesn't fully resolve what happens if offset exceeds file length, but it adds genuine semantics.

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 and resource ("Read the contents of a file") and enumerates supported media (text files and images), so the agent knows exactly what the tool does. However, it never distinguishes itself from siblings like bash (e.g., cat) or grep, so an agent gets no routing signal between 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?

Provides real usage guidance for one dimension — "Use offset/limit for large files" and "continue with offset until complete" — which tells the agent how to page through a large file. But it gives no when-to-use/when-not guidance relative to siblings (grep for search, ls for listing, write/edit for mutation), leaving the agent to infer the boundaries.

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

Deploy Server

Other Tools