Skip to main content
Glama

read_text_chunk

Reads bounded UTF-8 file chunks from a byte offset or file tail to inspect logs and growing files; resume from the returned cursor to fetch only appended data.

Instructions

Read a bounded chunk (up to 65536 bytes) of a UTF-8 text file starting at a byte offset, or the file's tail when offset is -1, inside the configured Owner read roots. Use for logs and growing files (read the tail first, then resume from the returned cursor to read only what was appended) or to resume a large read at an exact byte position. For walking a file forward page by page from the start, read_text_page is the simpler choice. Read-only; never creates or modifies files; no approval window.

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

Input Schema

NameRequiredDescriptionDefault
pathYesPath to the target within the already-configured Owner read/edit roots; path alone grants no access.
offsetNoByte offset for streaming, -1 to 268435456; -1 requests a bounded tail (default -1).
max_bytesNoMaximum bytes per chunk, 4 to 65536; default 16384.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A4.6/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 burden, and it does so well: 'Read-only; never creates or modifies files; no approval window' states the safety profile and the access precondition ('already-configured Owner read roots; path alone grants no access'). What it does not disclose is behavior at UTF-8 multibyte boundaries — whether a byte-offset chunk can split a codepoint or how the returned cursor relates to character boundaries — a real subtlety for a byte-addressed text reader.

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 sentences, front-loaded with the core verb/resource/scope before use cases and sibling routing. No filler, no restatement of the tool name, and the alternative is deferred to the end where it belongs.

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 values need not be explained, and the description still usefully mentions the returned cursor. Given three parameters and full schema coverage, the definition is complete enough to invoke correctly; only the multibyte/encoding-boundary behavior is left unstated.

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 coverage is 100%, so the baseline would be 3, but the description adds genuine meaning: offset=-1 means 'the file's tail' and the returned cursor is a resumable byte position, which together define the incremental-read workflow the schema cannot express. max_bytes is only loosely reflected ('up to 65536 bytes'), leaving its 4-byte minimum and 16384 default to the schema.

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

Purpose5/5

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

The first sentence gives a specific verb (read), the exact resource (a bounded chunk of up to 65536 bytes from a UTF-8 text file), and the scoping rule (inside the configured Owner read roots). It then explicitly contrasts itself with the sibling read_text_page, so an agent can discriminate between the two without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It names the concrete use cases (logs and growing files, reading the tail first and then resuming from the returned cursor, resuming a large read at an exact byte position). It also routes the agent elsewhere when the task is forward paging ('read_text_page is the simpler choice'), which is explicit alternative selection rather than implied usage.

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