Skip to main content
Glama

Read

read
Read-only

Retrieve file contents with line numbers or list directory entries, using offset and limit to page through large files.

Instructions

Read a file or list a directory. Text is returned with line numbers. Use offset (1-based) and limit to page through large files.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "read"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
limitNo
offsetNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds useful behavior: output is line-numbered text and large files are paged via offset/limit. It omits the directory-listing return shape and behavior on missing paths or binary files, so it adds context but not rich behavioral disclosure.

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?

Three short sentences with zero waste: capability first, return format second, paging guidance third. Front-loaded and appropriately sized for a simple tool.

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?

For a 3-parameter read tool with annotations and no output schema, the core is covered. However, the dual file/directory mode is a significant ambiguity: how directory contents are rendered and what happens on invalid paths is left unstated, which an agent would want before calling it on an unknown path.

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 0%, so the description must carry the load. It does explain offset as 1-based and both offset/limit as paging controls, which compensates for two of three parameters. It never clarifies what 'limit' counts (lines vs bytes) or whether 'path' must be absolute or relative, leaving a real gap.

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 a file or list a directory.' That is concrete enough to distinguish it from write/edit/grep, but it doesn't explicitly separate itself from glob (file discovery) or grep (content search), so sibling differentiation is only implied.

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 only guidance is 'use offset and limit to page through large files,' which is parameter usage rather than when-to-use. There is no statement about when to prefer this over glob for finding files or grep for searching content, so the agent must infer the boundaries itself.

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