Skip to main content
Glama

Download a stored file (paid)

download_file

Pay in USDC via x402 to download a file previously stored via POST /api/storage/upload. Call without paymentHeader first to receive the price + payment requirements.

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": {
      "fileId": "<fileId>"
    },
    "name": "download_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileIdYesThe fileId returned by the upload endpoint
paymentHeaderNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations present, the description carries the full burden and does disclose substantial non-obvious behavior: the operation is paywalled, the payment rail is USDC/x402, and it is a handshake flow. It omits failure/refund semantics and what a successful call actually returns (file bytes vs. a URL), which are meaningful gaps for a paid mutation of state.

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?

Two short sentences, payment requirement front-loaded, prerequisite (prior upload) stated second, and no filler. Every clause carries information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description should ideally state the return shape (binary content, download URL, or metadata) and any error behavior on missing/insufficient payment. The paid-flow context is present, but the agent's picture of the call's outcome remains incomplete.

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 50%: fileId is documented in the schema while paymentHeader has no schema description. The description compensates by explaining that paymentHeader is the payment credential and that omitting it triggers the price-discovery response, which is exactly the semantics an agent needs.

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?

Specific verb (download) plus resource (a previously stored file), with the added qualifier that access is paid in USDC via x402. This clearly separates it from the sibling upload_file and from read-only extractors like extract_images.

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 an explicit two-step calling procedure: invoke without paymentHeader first to obtain the price and payment requirements, then presumably re-call with it. No comparison to sibling tools is offered, but the usage condition for the payment branch is unambiguous.

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