Skip to main content
Glama

Read canvas files

read_files
Read-onlyIdempotent

Read canonical TSX and full-file SHA-256 contentHash for canvas frames, or the project's repository (bloom:devbox/repo/ in the live checkout, bloom:repo/ committed). Canvas entries include stable JSX sourcePath locators (50 per page; continue with elementsCursor and the same query), truncatedElementsCount, kind, importedFrameIds, openCommentThreads, theme (the layout the frame renders inside, picked or automatic, and its mode), and page ID/name. A bloom:file/ path that is no frame reads a text file (a stylesheet, JSON). Batches may span pages. Repository reads address the project's repository: when the client's local checkout is that repository, a path reads the same file there, and a frame imports it by that bloom:devbox/repo/ path instead of copying it. Canvas entries also carry the checks on exactly that source: typeStatus, typeCheck with lint, and runtimeCost, which is ran with over-budget rules, values and budgets, or unavailable when no browse_frame call recorded one. Each entry may take startLine/endLine (1-based, inclusive) or find (only the lines containing that text, as matches); every success reports totalLines for the whole file. A find or line-range read leaves out element locators (elementsOmitted; pass query to get them). The envelope's verification lists the batch's own frames; otherFilesWithErrors counts the rest of the branch's failing files. To read any file as it was at a version, prefix its path with the version: bloom:file@/ (the snapshotVersionId a message's acceptedCanvasVersionId or submittedCanvasContext names). The answer is that version's file even after a rename, a move or a reuse of the path; a folder path returns its children as JSON with nextCursor (pass it back as cursor); a blob returns its name, type, size and a read URL. Version paths are read-only: every mutating tool rejects them with PROJECT_VFS_VERSION_READ_ONLY. Arguments take the shape { files: [{ path }] }. Scope: project:read.

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": {
      "files": "<files>"
    },
    "name": "read_files"
  }
}

Input Schema

NameRequiredDescriptionDefault
filesYesFrames or sandbox files to read. Each result carries the full-file `contentHash` — pass it back as a `write_files` entry's `basis` — and `totalLines`, the full file's line count, so a ranged read knows where the file ends.
branchIdNoTarget branch id. Omit it — Bloom derives the branch from the frames you name, from the token's narrowing, or from your only readable branch, and enumerates the candidates if it genuinely cannot.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior5/5

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

Beyond the readOnlyHint and idempotentHint annotations, the description discloses pagination behavior, element locator omission on ranged or find reads, version-path read-only rejection, verification envelope contents, and cursor semantics. It also explains contentHash and totalLines returns without an output schema. This is unusually rich behavioral context for a read tool.

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 description is front-loaded with the core purpose, but it becomes a dense single paragraph with very long sentences and many nested clauses. The information is valuable, yet it is harder to scan than a structured or bulleted presentation would be. It is not wasteful, but it is not concise.

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 complex read tool with nested file entries, versioned paths, cursors, and no output schema, the description covers the important return fields and edge cases. It explains contentHash, totalLines, elementsOmitted, verification, version read-only behavior, and cursor continuation. An agent has enough context to invoke it correctly.

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 coverage is 100%, so parameter names and basic meanings are already documented. The description adds useful interaction semantics: find and line-range reads omit element locators unless query is passed, batches may span pages, and version paths affect how the same path is resolved. It does not add meaning for branchId beyond the schema, but the additional behavioral interaction detail exceeds the baseline.

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?

The description opens with a specific verb and resource set: reading canonical TSX and full-file contentHash for canvas frames or repository paths. It also clarifies that text files and versioned snapshots are supported. However, it does not explicitly distinguish read_files from sibling tools such as read_frame_state, browse_frame, or list_canvas_frames.

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?

The description gives conditional guidance for version paths and for using find instead of whole-file reads, but it does not state when to choose read_files over sibling tools. There are no explicit exclusions or alternative-tool routing rules. Usage is therefore implied rather than directly guided.

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