Skip to main content
Glama

Download a file in pieces (any type)

download_storage_part
Read-onlyIdempotent

Get any file from a bucket as base64, in pieces, when your own tools cannot open the download link: PDFs, images, zips and other binary files as well as text. Each call returns up to 512 KB starting at offset (default 0); keep calling with the returned next_offset until done is true, then join the pieces in order and decode them. Check total_bytes first: a file over about 5 MB needs many calls, so for big files use storage_file_link instead. To find the 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": "download_storage_part"
  }
}

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 524288).
service_idYesObject Storage service id, as returned by the matching list tool.

Output Schema

NameRequiredDescriptionDefault
keyNo
doneNo
partNo
offsetNo
bytes_readNo
next_offsetNo
total_bytesNo
content_typeNo
content_base64No

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive), and the description adds substantive behavior beyond them: 512 KB per-call ceiling, offset syntax, next_offset/done loop termination, and the join-then-decode requirement for the returned pieces. The total_bytes size check is a real operational constraint that prevents an agent from issuing dozens of calls blindly.

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 purpose, then the loop mechanics, then the size-based alternative, then discovery. All sentences carry weight, though the file-type enumeration ('PDFs, images, zips ... as well as text') partly restates 'any file'.

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 chunked-download tool with an output schema and full annotations, the description covers the whole workflow an agent needs: find the file, size-check it, page through offsets, and reassemble. Nothing essential to correct invocation is left unspecified.

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%, so the baseline is 3; the description adds meaning by explaining how offset and the 512 KB cap interact across calls (start at offset, default 0, advance via next_offset), which the schema alone does not convey. It does not explain max_bytes by name, leaving that to the schema.

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 ('Get any file from a bucket as base64, in pieces') plus the constraint that motivates it: the caller's own tools cannot open the download link. It explicitly separates itself from storage_file_link and search_storage_files, so an agent can route correctly without opening schemas.

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 when-to-use (binary or text files your tools can't open), when-to-switch (over ~5 MB, use storage_file_link), and a prerequisite (search_storage_files to find the file). It also prescribes the exact call loop: repeat with next_offset until done, then join and decode in order.

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.