Skip to main content
Glama

Read File

read_file
Read-only

Read a file from a Floot project (cat -n style); offset/limit for large files, column to start mid-line (a capped read names the offset and column to continue from). Paths: 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. include_references:true also lists the files that reference this one (imports, queueTask/runCode names, endpoint URL strings): check it before renaming or deleting, or use rename_file, which rewrites importers. Hosted assets read too (/_cdn/ as upload_asset / generate_image return it, private/): png/jpeg/gif/webp come back as an image you can see (≤3.75 MB), text as text, other binaries as a summary. No typecheck by default: diagnostics:"auto" appends a .ts/.tsx file's current type errors when the VM is warm, "wait" boots it and forces the check. older_than walks the file's history: "current" shows it just before its latest change, the returned cursor steps further back; restore by writing the old content with write_file.

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": {
      "projectId": "<projectId>",
      "path": "<path>"
    },
    "name": "read_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
limitNo
columnNo
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
    • addedInput schema / properties / column
      Added value: +{
      +  "minimum": 1,
      +  "type": "integer"
      +}
  2. 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."
  3. 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"
      +}
  4. Changed1 schema field changed
    • addedInput schema / properties / include_references
      Added value: +{
      +  "type": "boolean"
      +}
  5. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare this a safe read, but the description adds substantially more: assets return as viewable images up to 3.75 MB, other binaries as a summary, paging via offset/column, warm-VM semantics for diagnostics, and that past versions skip type errors and references. It also closes the loop on history reads by pointing to write_file to restore old content.

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

Conciseness4/5

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

Front-loaded with the core action and paging rules before the finer options, so an agent can stop reading early and still call it correctly. It is a single dense paragraph with several semicolon-chained clauses and a long path enumeration, which is information-dense but harder to scan than a short bulleted structure.

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 an 8-parameter read tool with no output schema and thin schema documentation, the description covers return shapes (image vs text vs binary summary), paging, references, diagnostics cost, and history/restore, which is what an agent needs to call it well. Only minor items, such as the identifier for projectId and default paging size, are left unstated.

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 13% (only older_than is documented), so the description must carry the load, and it largely does: it explains offset/limit for large files, column for starting mid-line, include_references semantics, and the meaning of the diagnostics values. Gaps remain for projectId and for the default/max behavior of limit, which are left to the schema or to inference.

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 qualifies the mode (cat -n style, offset/limit paging). It also names a sibling it interacts with (rename_file) and enumerates the exact path shapes it accepts, so an agent knows precisely what this tool operates on.

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?

Gives explicit when-to-use conditions for optional flags: include_references "check it before renaming or deleting, or use rename_file, which rewrites importers", diagnostics "auto" vs "wait" depending on whether the VM is warm, and older_than for walking history. It also states when NOT to spend a typecheck ("No typecheck by default"), so the agent can choose the cheap path.

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