Skip to main content
Glama
local-context
by JustinA988

read_file

Read-only

Reads a capped text slice from a file at a specified character offset, letting you inspect large files in controlled portions without loading the entire file.

Instructions

Read a capped text slice. offset is a character offset.

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_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesFile inside an allowed root.
limitNoMax characters.
offsetNoCharacter offset.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior3/5

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

Annotations already cover the safety profile (readOnlyHint, destructiveHint, openWorldHint). The description adds one genuinely useful behavior beyond them: output is 'capped', signalling truncation, though it never states the default cap or what happens when a file exceeds it. The remaining behavior is left implicit.

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?

Two short sentences with no padding, and the core action is front-loaded. The brevity borders on under-specification rather than verbosity.

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?

A simple read tool with annotations covering safety and full schema coverage, so little is required. The notable gap is truncation semantics: how the cap interacts with limit and offset is unexplained, and there is no output schema to compensate.

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%, so the schema already documents path, limit, and offset. The description's note that offset is a character offset merely repeats the schema's own wording, adding no new meaning.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description says 'Read a capped text slice', which combined with the name and path parameter makes the purpose inferable, but it never uses the word 'file' or states the resource explicitly. It offers no differentiation from siblings like read_source or search_text.

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?

There is no guidance on when to use this tool versus read_source, search_text, or query_sql, and no prerequisites or exclusions are stated. The agent must infer usage entirely from the name and schema.

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