Skip to main content
Glama

read_file

Read-onlyIdempotent

Read the text content of a UTF-8 file on an authorized, online remote device. device_id identifies the target; path is its local file path. max_chars controls each response chunk (1–200000 characters, default 200000). Set offset_bytes to the previous next_offset_bytes to read the entire UTF-8 file without a file-size denial. Read-only; not suitable for binary 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": {
      "device_id": "<device_id>",
      "path": "<path>"
    },
    "name": "read_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
device_idYes
max_charsNo
offset_bytesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / offset_bytes
      Added value: +{
      +  "default": 0,
      +  "title": "Offset Bytes",
      +  "type": "integer"
      +}
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations (which only declare readOnly/idempotent/non-destructive), the description discloses that the target must be paired and online, that responses are chunked and capped at 200000 characters, and that an unchained large read triggers a file-size denial — a real behavioral trap an agent must know about. This is meaningful context the structured fields do not carry.

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?

Five tight sentences with no filler; the core purpose comes first, followed by parameter semantics and then the pagination procedure. The 'without a file-size denial' clause earns its space by explaining why offset chaining matters.

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 four-parameter read tool with no output schema, the definition covers preconditions, pagination, and limits well. The one residual gap is that the response shape is only implied — next_offset_bytes is referenced but the returned fields (text payload, truncation flag) are never enumerated, though an agent can still call the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/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 does: device_id is the target device, path is the device-local path, max_chars is the per-response chunk size with range and default, and offset_bytes is explicitly defined in terms of the previous response's next_offset_bytes. All four parameters gain meaning absent from the bare 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?

States a specific verb and resource ('Read the text content of a UTF-8 file') plus the scope constraint ('on an authorized, online remote device') and a negative boundary ('not suitable for binary files'). An agent can tell immediately that this is the content-reading tool, distinct from file_info, list_files, or write_file.

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

Usage Guidelines4/5

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

Gives clear preconditions (device must be authorized and online), a positive procedure for full-file reads via offset_bytes chaining, and an explicit exclusion for binary files. It never names a sibling such as file_info as the alternative for metadata, so it stops just short of full when/when-not/alternative coverage.

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