Skip to main content
Glama

read_file

Read file contents from the filesystem using relative or absolute paths. Use it to retrieve file data for inspection or processing.

Instructions

Reads file contents from the filesystem. Supports relative and absolute paths.

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
pathYesPath to the file to read (e.g., "data/example.txt")

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are supplied, so the description must carry the full behavioral burden, and it does not. It says nothing about behavior on a nonexistent path, permission errors, binary or large files, encoding, or whether content is truncated; only path resolution is disclosed.

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?

Two short sentences, no waste, with the core operation front-loaded and the path-format caveat second. Nothing is padded or repeated from the schema.

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 one-parameter read tool with no output schema, the definition covers the essentials: what is read and which path forms are valid. Remaining gaps (error behavior, encoding, size limits) are modest for a tool whose return value is self-evident.

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

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, and the description goes beyond the schema by stating that both relative and absolute paths are accepted — information the schema example (a relative path) does not convey. It adds no detail on whether paths are sandboxed or resolved against a specific root, but the added semantics are real.

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: "Reads file contents from the filesystem." An agent can tell this is a read operation rather than an execution or formatting tool. It does not position itself against any named sibling, but none of the listed siblings appear to be a competing file reader, so the gap is minor.

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?

There is no when-to-use or when-not-to-use guidance, no prerequisites, and no mention of alternatives for obtaining file content (e.g., a system-command sibling). The only usage hint is the path-format note, which concerns syntax rather than tool selection.

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