Skip to main content
Glama

Read File

read_file
Read-only

Read plain UTF-8 text files from approved workspace paths to inspect source, configuration, or documentation content.

Instructions

Read a plain UTF-8 text file (.txt, .md, .py, .json, .yaml, etc.) from an approved workspace path.

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

Input Schema

NameRequiredDescriptionDefault
pathYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior3/5

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

The readOnlyHint annotation already establishes that this is a non-mutating read, so the description only needs to add scope, which it does with 'plain UTF-8 text' and 'approved workspace path' — the latter being genuine access-context not present in the schema. It says nothing about behavior on missing files, unsupported encodings, large files, or whether the path may be absolute or relative.

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?

A single well-formed sentence with the format constraint front-loaded and the access constraint following; every clause carries information and there is no filler.

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?

With an output schema present, return values need no explanation, and for a one-parameter read tool the description covers the essential scope (file type, location restriction). The remaining gaps — error behavior and path resolution — are minor for this complexity level.

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% for the single 'path' parameter, so the description carries the burden and does add meaning: the path must point to a plain UTF-8 text file inside an approved workspace. It still omits path form (relative vs absolute), workspace-relative resolution rules, and any example, so the compensation is only partial.

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?

The description gives a concrete verb plus resource ('Read a plain UTF-8 text file') and enumerates accepted extensions (.txt, .md, .py, .json, .yaml), which implicitly separates it from binary/document siblings such as read_document and read_image_text. It never names those siblings, so the differentiation is inferred from the format constraint rather than stated.

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?

Usage is only implied: by restricting itself to plain UTF-8 text files it hints that other readers should be used for documents or images, but there is no explicit 'use this when...' or 'use read_document instead for...' routing. An agent must infer the boundary from the file-extension list.

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