Skip to main content
Glama

Read a file

fs_read
Read-onlyIdempotent

Read a text file from the project: path, or paths for up to 20 files at once. Paths start with "workspace/" (code) or "data/". Long files come in pages: pass offset (line, 1-based) and limit (lines). With paths, each file shows its first limit lines (default 400) under a header line, a longer one says the offset to continue from, a missing or binary file is said for that file, and files past one answer's size are listed as not read (200 KB, or about 25 KB for apps that keep tool results short, such as Claude Code: read a few at a time there). Binary files are refused. env production reads the live site's file (its code as published, its own data/), read-only: when the live site misbehaves, look at what it really has, and fs_diff compares it with the preview.

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": {
      "project": "<project>"
    },
    "name": "fs_read"
  }
}

Input Schema

NameRequiredDescriptionDefault
envNopreview (default), or production: the live site's files, read-only (its code as published plus its own /data), for the project's owner and editors.preview
pathNoPath starting with "workspace/" (the code, /workspace) or "data/" (runtime files, /data).
limitNo
pathsNoUp to 20 files in one call, instead of path, e.g. ["workspace/package.json", "workspace/src/app.ts"].
offsetNo
projectYesProject slug or id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds substantial operational detail on top: paging with 1-based line offsets, a default of 400 lines per file, a continuation offset hint, per-file error reporting for missing or binary files, and an explicit 200 KB (≈25 KB in some clients) answer-size ceiling with files beyond it listed as not read. It also discloses that production reads are read-only and permission-scoped to owners/editors. This is well beyond what the annotations convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded, but the body degenerates into long comma-spliced clauses with nested parentheticals ("a missing or binary file is said for that file, and files past one answer's size are listed as not read (200 KB, or about 25 KB ...)"). The content is useful but would read far better as short bulleted sentences; several phrasings are awkward enough to require a second pass.

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 six parameters, no output schema, and moderate schema coverage, the description carries its weight: it explains the return shape per file (header line, first N lines, continuation offset, per-file error notes) and the batch truncation rule. Remaining gaps are small — interaction between path and paths, and the 2000-line cap.

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?

Adds real meaning beyond the 67%-covered schema: offset is a 1-based line number, limit defaults to 400 lines per file in batch mode, paths is an alternative to path capped at 20, and env production means the live site's published code plus its own /data. It does not mention the schema's limit maximum of 2000 or what happens if both path and paths are supplied.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb+resource ("Read a text file from the project") and immediately distinguishes the two modes: single path versus up to 20 paths at once. It also names fs_diff explicitly, so an agent can separate reading from comparing without opening another schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a clear conditional for the non-default mode: use env=production "when the live site misbehaves, look at what it really has, and fs_diff compares it with the preview." It also advises reading a few files at a time in size-constrained clients. It stops short of steering between fs_read and siblings like fs_search or fs_list for discovery-style lookups.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources