Skip to main content
Glama

Read file

read_file
Read-onlyIdempotent

Use this when the task calls for plain text files on a paired computer: source code, configuration, Markdown, logs, scripts, or other line-oriented text. Use read_document instead for PDF, DOCX, XLSX and other structured document content. read_file keeps legacy PDF/DOCX extraction for compatibility but should not be the model’s first choice for those formats.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path of the file to read. Relative paths resolve against the runtime working directory.
deviceYesReMCP device id returned by list_devices. Required for every device operation.
lengthNoMaximum number of lines to return.
offsetNoZero-based first line to read. Negative values read the last N lines.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNoOptional structured result data for follow-up reasoning and tool calls.
textYesConcise human-readable result of the tool call.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • removedOutput schema / properties / preview
      Removed value: -{
      -  "additionalProperties": false,
      -  "description": "Optional short-lived presentation reference retained for compatible app-side retry helpers; UI-capable hosts render the source tool directly.",
      -  "properties": {
      -    "id": {
      -      "description": "Opaque short-lived preview id scoped to the signed-in ReMCP account.",
      -      "type": "string"
      -    },
      -    "kind": {
      -      "description": "Preview payload kind.",
      -      "enum": [
      -        "file",
      -        "image",
      -        "terminal"
      -      ],
      -      "type": "string"
      -    },
      -    "renderTool": {
      -      "description": "Presentation-only tool that renders this already-returned result.",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "id",
      -    "kind",
      -    "renderTool"
      -  ],
      -  "type": "object"
      -}
  2. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and non-destructive behavior, so the description's burden is lower. It adds meaningful behavioral context by disclosing legacy PDF/DOCX extraction compatibility and counseling against it, which is not captured by annotations.

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 with each earning its place: the primary use case, the alternative for structured documents, and a compatibility caveat. No redundant or filler content is present.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given a complete parameter schema, annotations, and an output schema, the description fully covers what an agent needs to decide when to call this tool and what to expect. It addresses format scope, exclusions, and legacy behavior without over-explaining.

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?

Input schema description coverage is 100%, so parameters are fully documented there. The description does not add semantic detail about path/device/length/offset beyond the schema, making the baseline score of 3 appropriate.

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?

Description clearly identifies the tool as reading plain text files on a paired computer and enumerates concrete example formats (source code, config, Markdown, logs, scripts). It explicitly contrasts with read_document for structured document formats, which distinguishes scope even if read_document is not among the listed siblings.

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?

Provides explicit when-to-use guidance for plain text files and directs model to read_document for PDF/DOCX/XLSX. Also warns that legacy PDF/DOCX extraction is supported but not the first choice, leaving no ambiguity about selection.

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