Skip to main content
Glama

fs_read_file

Read-onlyIdempotent

Read UTF-8 text files inside a sandboxed workspace root, optionally by line range, with path-jail checks, credential blocking, and SHA-256 digest verification.

Instructions

Read a UTF-8 text file inside the sandbox workspace root with line-range filtering, canonical path jail verification, sensitive credential blocking, and SHA-256 digest.

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": "fs_read_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesRelative path to the file inside the workspace root.
end_lineNo1-based ending line number (inclusive). Omit to read to end of file.
max_bytesNoOptional maximum byte cap for this read operation.
start_lineNo1-based starting line number (inclusive).

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?

Annotations already declare readOnly/idempotent/non-destructive/closed-world, yet the description adds genuinely new behavior: canonical path jail verification, sensitive credential blocking, and a SHA-256 digest. It stops short of saying what happens on a jail escape or credential match (error vs. empty result) or how max_bytes truncation is signaled.

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 front-loaded sentence: verb and resource first, then the capability list. No filler, no restatement of the title, and each clause carries distinct information.

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 4-parameter read tool with no output schema, the definition covers safety, filtering, and integrity verification, which is most of what an agent needs. It leaves the return shape under-described (how content is framed, whether truncation or the digest appear in the result), which matters a bit more given there is no output schema.

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 100%, so path, start_line, end_line, and max_bytes are already fully documented with defaults and constraints. The description echoes only the line-range concept and adds no syntax, interaction (e.g., end_line with max_bytes), or edge-case semantics beyond 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 a UTF-8 text file") plus scope ("inside the sandbox workspace root") and the main capability modifiers (line-range filtering, path jail, credential blocking, digest). This clearly separates it from write/patch/exec siblings, though it never names fs_search_text or fs_list_directory as the alternatives for non-file-scoped lookups.

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 the scope phrase "inside the sandbox workspace root" and by the read-only nature of the operation. There is no explicit when-to-use / when-not guidance and no pointer to siblings such as fs_search_text for content search or fs_list_directory for enumeration, so an agent must infer the routing itself.

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