Skip to main content
Glama

read file

exza_read_file
Read-only

Read a local file in bounded 32 KiB chunks (up to 50 MiB total file size). Keeps the file on the owner computer. Use offsetBytes=nextOffsetBytes to continue; pass expectedFileVersion and expectedSha256 from first result to detect file changes. Text defaults to UTF-8; use format=base64 for binary. Never request private files outside approved device scope.

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": "exza_read_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
formatNo
lengthBytesNo
offsetBytesNo
expectedSha256No
expectedFileVersionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Changed6 schema fields changed
    • addedInput schema / properties / expectedFileVersion / description
      Added value: +"Version marker returned by initial file read; reject changed files."
    • addedInput schema / properties / expectedSha256 / description
      Added value: +"Lowercase SHA-256 from the prior read; prevents overwriting changed content."
    • addedInput schema / properties / format / description
      Added value: +"Output format for file bytes, such as base64 for binary data."
    • addedInput schema / properties / lengthBytes / description
      Added value: +"Value provided by the user for this tool; see operation-specific constraints."
    • addedInput schema / properties / offsetBytes / description
      Added value: +"Byte offset for next bounded file chunk; start with zero."
    • addedInput schema / properties / path / description
      Added value: +"Explicit path inside the scope for this tool; no symlink traversal where prohibited."
  4. First observed

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare this a safe, non-destructive, closed-world read, and the description adds substantial behavior beyond them: the 32 KiB chunk ceiling, the 50 MiB total-size limit, the offset-based continuation protocol, and the optimistic-concurrency check via expectedFileVersion/expectedSha256. It does not say what signals end-of-file (e.g. whether nextOffsetBytes is null when done) or how mismatches are reported, so it stops short of 5.

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 compact sentences, front-loaded with the core action and size bounds before the paging and integrity mechanics. Telegrams like "Keeps the file on the owner computer" are terse but informative; no sentence is filler. Minor friction from the slightly clipped phrasing rather than from 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?

With no output schema, the description does the right thing by naming result-derived fields (nextOffsetBytes, expectedFileVersion, expectedSha256) and the binary/text distinction. Still missing for a 6-parameter tool: what terminates a chunked read, what happens on version/SHA mismatch, and a description of path's scope beyond the closing warning. Adequate, but an agent could stall at the end of a paging loop.

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 carries the full burden, and it only partly does: offsetBytes, expectedFileVersion, expectedSha256, and format are all given meaning the schema lacks. However, lengthBytes is never mentioned (the 32 KiB bound is only implied), and path's semantics — the approved device scope — are only hinted at via a prohibition rather than explained.

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 local file") and immediately bounds it (32 KiB chunks, 50 MiB max total, file stays on the owner's computer), so the agent knows exactly what class of operation this is. It does not distinguish itself from close siblings such as exza_home_read_text or exza_home_read_multiple_text, which is the only thing keeping it from a 5.

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?

Gives concrete in-call usage rules: continue with offsetBytes=nextOffsetBytes, pass expectedFileVersion/expectedSha256 from the first result to detect changes, and use format=base64 for binary content. What it lacks is routing guidance — nothing says when to pick this over exza_home_read_text or exza_list_files, so the agent must infer that this is the chunked/general-purpose reader.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources