Skip to main content
Glama

Read File

read_file
Read-only

Read a file from a Floot project (cat -n style). Paths follow the item scheme: components/Name.tsx, components/Name.module.css, helpers/Name.tsx, pages/name.tsx, pages/name.pageLayout.tsx, endpoints/route_POST.ts, endpoints/route_POST.schema.ts, static/file.txt, base.css. Use offset/limit for large files. Pass include_references:true to also list which project files reference this one (static import graph plus queueTask/runCode name references and, for endpoints, URL-path string usage) — check it before renaming or deleting a file, or use rename_file which rewrites importers itself. Hosted assets are readable too: pass the project-relative asset path (/_cdn/, as returned by upload_asset / generate_image or used in the app's ; private/ for private storage) and a png/jpeg/gif/webp image is returned as an image you can see (≤3.75 MB), text-typed assets as text, other binaries as a size/type summary. A read does not typecheck by default: pass diagnostics:"auto" to append a .ts/.tsx file's CURRENT type errors when the project's compute VM is already warm (so you see latent errors before editing), or "wait" to boot the VM and force the check. older_than walks the file's HISTORY: pass "current" to see the file as it was just before its latest change, then the cursor from that result to step one change further back — use it when something used to work and you want to compare or restore an earlier version (write the old content back with write_file).

Input Schema

NameRequiredDescriptionDefault
pathYes
limitNo
offsetNo
projectIdYes
older_thanNoOmit (or leave empty) to read the current file. Set it only to read the file as it was BEFORE an earlier change. Pass "current" for the version just before the latest change to it, then the cursor each result gives you to step one change further back — until you find a good version, then write it back with write_file (or merge by hand). Not a version number: each step is one recorded change to the file. Type errors and references are skipped for past versions.
diagnosticsNo
include_referencesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / older_than / description
      Previous value: -"Read the file as it was BEFORE an earlier change instead of the current file. Pass \"current\" for the version just before the latest change to it, then the cursor each result gives you to step one change further back — until you find a good version, then write it back with write_file (or merge by hand). Not a version number: each step is one recorded change to the file. Type errors and references are skipped for past versions."New value: +"Omit (or leave empty) to read the current file. Set it only to read the file as it was BEFORE an earlier change. Pass \"current\" for the version just before the latest change to it, then the cursor each result gives you to step one change further back — until you find a good version, then write it back with write_file (or merge by hand). Not a version number: each step is one recorded change to the file. Type errors and references are skipped for past versions."
  2. Changed1 schema field changed
    • addedInput schema / properties / older_than
      Added value: +{
      +  "description": "Read the file as it was BEFORE an earlier change instead of the current file. Pass \"current\" for the version just before the latest change to it, then the cursor each result gives you to step one change further back — until you find a good version, then write it back with write_file (or merge by hand). Not a version number: each step is one recorded change to the file. Type errors and references are skipped for past versions.",
      +  "type": "string"
      +}
  3. Changed1 schema field changed
    • addedInput schema / properties / include_references
      Added value: +{
      +  "type": "boolean"
      +}
  4. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations only declare readOnlyHint/openWorldHint/destructiveHint, so the description does the heavy lifting: it discloses that binary/image assets are returned as viewable images (≤3.75 MB), that reads do not typecheck by default, that references/type errors are skipped for past versions, and how history walks one change at a time. It stops short of describing pagination/truncation behavior for large text reads.

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?

The purpose is front-loaded, but the body is one dense multi-clause paragraph with parenthetical asides that is harder to scan than it needs to be. Nearly every clause carries real information, so it is not padding, but the structure could be broken up.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 7-parameter tool with no output schema and only 14% schema coverage, the description covers the asset/image return path, history reading, diagnostics, and reference checking. An agent has everything needed to call it correctly in both the normal and edge cases.

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 description coverage is only 14%, so the description must compensate, and it does: it explains path formats, offset/limit purpose, the include_references semantics, diagnostics modes, and especially older_than (cursor stepping, 'current', and that it is not a version number). projectId and the exact limit cap remain undocumented, leaving a small gap.

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?

States a specific verb and resource ('Read a file from a Floot project') and immediately disambiguates scope with the cat -n style and the full path scheme, so an agent can distinguish it from list_files, read_files, and search_code without opening a schema.

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

Usage Guidelines5/5

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

Explicit when-to-use guidance throughout: offset/limit for large files, include_references before renaming/deleting (or use rename_file instead), diagnostics:auto vs wait depending on whether you want to see latent type errors before editing, and older_than for comparing/restoring earlier versions. Conditional alternatives and exclusions are all named.

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