Skip to main content
Glama

Read file

read_file
Read-only

Read text file contents on local or remote Linux hosts up to a safe size limit to troubleshoot system configurations, logs, and other diagnostics.

Instructions

Read the contents of a text file up to a safe size limit.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostYesSystem to run on: 'localhost' for the system the MCP server runs on, or a remote host to connect to via SSH
pathYesAbsolute path to the file to read

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv1.7.0
    • removedInput schema / properties / host / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / host / default
      Removed value: -null
    • changedInput schema / properties / host / description
      Previous value: -"Remote host to connect to via SSH"New value: +"System to run on: 'localhost' for the system the MCP server runs on, or a remote host to connect to via SSH"
    • addedInput schema / properties / host / examples
      Added value: +[
      +  "localhost",
      +  "web1.example.com"
      +]
    • addedInput schema / properties / host / type
      Added value: +"string"
    • changedInput schema / required
      Previous value: -[
      -  "path"
      -]New value: +[
      +  "path",
      +  "host"
      +]
  2. Changed1 schema field changedv1.6.0
    • addedInput schema / additionalProperties
      Added value: +false
  3. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

readOnlyHint=true already establishes the safety profile, and the description adds one genuine behavioral fact: a size cap that can truncate content. However, it says nothing about how truncation is signalled, whether large files error or partially return, or what reading a remote host over SSH entails. Adequate but thin for a tool with a size-based failure mode.

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?

A single front-loaded sentence with no filler; the size constraint is stated immediately. It is efficient but so terse that it reads more like a label than a full specification.

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?

An output schema exists so return values need not be explained, and annotations cover the read-only nature. Still, a tool that reads either local or SSH-remote files under a size limit leaves gaps around truncation behavior and the local/remote distinction that the description could have closed in one sentence.

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 coverage is 100%, so both 'host' (localhost vs. SSH remote) and 'path' (absolute) are fully documented in the schema. The description's only parameter-relevant contribution is the word 'text', implying binary paths are unsupported, which does not materially extend the schema. Baseline 3 applies.

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 the contents of a text file') plus a scope qualifier ('up to a safe size limit'). It is clear on its own, but does not differentiate from the sibling read_log_file, which overlaps heavily in purpose.

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?

No when-to-use guidance, no exclusions (e.g. binary files), and no routing to the obvious alternative read_log_file for log content. The reader must infer the choice purely from the names.

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