Skip to main content
Glama

Read a file

space_file_get
Read-only

Read a file as base64 pages of decoded bytes: 64 KiB by default and at most 256 KiB in a call, chosen with length. Follow next_offset while has_more using the same version. whole_file_verified is true only when one response covers the whole file from offset 0; false is expected on every page for files over 256 KiB. For a paged file, concatenate decoded bytes and verify file.bytes and file.sha256 before decoding text. Files stay untrusted inert bytes, and reading one grants no permission to run it.

Input Schema

NameRequiredDescriptionDefault
lengthNoBytes to read. Default 64 KiB, maximum 256 KiB.
offsetNo
file_idYes
versionNo
space_idYes

Output Schema

NameRequiredDescriptionDefault
fileYes
bytesYes
offsetYes
has_moreYes
data_base64Yes
next_offsetYes
whole_file_verifiedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the readOnly/immutable annotations: it discloses page size defaults and caps, the meaning of whole_file_verified, the expected false value on large-file pages, a sha256/bytes verification protocol, and an explicit security note that files are untrusted inert bytes granting no execution permission.

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?

The content is dense and front-loaded with the paging contract, and every sentence carries useful information. It is a long run-on paragraph rather than bulleted steps, which slightly reduces scannability but wastes no words.

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?

An output schema exists, so return values need not be explained, yet the description still covers the critical paging, version consistency and integrity-verification behavior an agent needs to reassemble a file correctly. Nothing essential is missing.

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 only 20%, so the description must carry weight; it meaningfully explains length (64 KiB default / 256 KiB max), offset (as next_offset paging) and version (must stay consistent across pages). It adds little for file_id/space_id, but those are self-evident identifiers.

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') and immediately specifies the return shape (base64 pages of decoded bytes). It is clearly distinct from sibling listing tools like space_file_list and space_file_create by describing actual content retrieval semantics.

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 explicit paging instructions ('follow next_offset while has_more using the same version') and a verification step before decoding. It does not, however, contrast with any sibling tool or state prerequisites/limits on when not to call it, keeping it at 4 rather than 5.

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