Skip to main content
Glama

Read a file from storage

read_storage_file
Read-onlyIdempotent

Read the text of one file in a bucket (notes, CSV, JSON, logs, code, HTML, SQL). Returns up to max_bytes (default 64 KB, at most 256 KB) starting at offset; for a bigger file call again with the returned next_offset. Binary files (images, PDFs, archives) are not read; use storage_file_link for those. To find the right file first, use search_storage_files.

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": {
      "service_id": "<service_id>",
      "region": "<region>",
      "bucket": "<bucket>",
      "key": "<key>"
    },
    "name": "read_storage_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYes
bucketYesBucket name (3-63 lowercase letters, digits, dots, hyphens).
offsetNoByte to start from (default 0).
regionYesRegion code from storage_plans or storage_overview, e.g. fra (Frankfurt), usa (Virginia), sgp (Singapore).
max_bytesNoHow much to read (default 65536).
service_idYesObject Storage service id, as returned by the matching list tool.

Output Schema

NameRequiredDescriptionDefault
keyNo
textNo
offsetNo
truncatedNo
bytes_readNo
next_offsetNo
total_bytesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnly, idempotent, non-destructive, but the description goes further by disclosing the truncation contract: a default 64 KB read, hard cap of 256 KB, offset-based resumption, and a next_offset return value. It also states the negative behavior (binary files are not read) that no annotation covers.

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

Conciseness5/5

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

Four tight sentences, front-loaded with the core action, then the size/pagination contract, then the two sibling redirects. Every clause carries information an agent needs; nothing is restated from annotations or the schema.

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?

With an output schema present, the description need not explain return values, and it correctly spends its words on the one return detail that affects the next call (next_offset). For a read tool with six params and four required identifiers, the coverage of paging, caps, and file-type exclusions is sufficient 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 83% and the schema already documents offset, max_bytes defaults, and region examples, so the description does not need to repeat them. It still adds value by framing offset and max_bytes as a pagination loop tied to next_offset, which the schema does not convey on its own.

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 the text of one file in a bucket') and enumerates the content types covered (notes, CSV, JSON, logs, code, HTML, SQL), which pins down scope precisely. It also names the sibling tools it is not (storage_file_link, search_storage_files), so the agent can distinguish it without opening the 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?

Gives explicit routing rules: for a bigger file call again with the returned next_offset, for binary files use storage_file_link, and to locate the file first use search_storage_files. When-to-use and when-not-to-use are both stated with the named alternative for each case.

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.