Skip to main content
Glama

read

Safely loads one text file from the project root, enabling AI agents to inspect source contents while blocking path escapes and rejecting binary or oversized files.

Instructions

Read one text file. Paths cannot leave the root; binary and oversized files are rejected.

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": {
      "file_path": "<file_path>"
    },
    "name": "read"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoLocal project directory. Defaults to the server's working directory.
formatNoOutput format: 'markdown' (default) or 'json' (structured envelope).markdown
file_pathYesPath of the file relative to the project root.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations supplied, the description carries the behavioral burden and does disclose meaningful constraints: root-sandboxed paths, and rejection of binary and oversized files. It omits the size threshold and any permission/auth context, which keeps it below a 5.

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, zero waste, with the core action stated first and the guardrails second. Nothing is redundant.

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 simple single-file read tool with an output schema covering return values and full schema descriptions, the description is nearly sufficient. The only genuine gap is the undefined size limit for rejected files.

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 all three parameters (path, format, file_path) are already documented in structured fields. The description adds only a constraint on file_path (cannot leave the root), not format or default-directory semantics, so the 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 one text file"), and the word "one" implicitly contrasts with the sibling read_many. It does not name a sibling explicitly, but the scope is unambiguous.

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: an agent infers this is the tool for reading a single file rather than many or searching. There is no explicit when-to-use/when-not guidance or mention of the search/read_many alternatives.

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