Skip to main content
Glama

download_file

Read-only

Downloads any file as raw, unparsed bytes from up to 50 URLs and returns content type, SHA-256, and a local path or temporary link for each.

Instructions

Downloads any file as bytes — 1–50, unparsed: a PDF, zip, image, audio, dataset. Call download_file{urls:["https://…/data.zip"]}. Returns a === [n/N] {url} block per item, input order: kind, content type, bytes, sha256, via, then path (local: take the file there) or url and expiry plus a resource_link (remote: run curl -fL -o <file> <url>, check the sha256, never read it into context; a url dies in 10 minutes or at a server restart, so call again). Reading a page or paper → read. A failed item is its header and an error: line; the others still return.

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

Input Schema

NameRequiredDescriptionDefault
urlsYes1–50 URLs of files of any kind, each downloaded as bytes, unparsed, in the same order.
headersNoOptional request headers (name → value) sent only to the target's own origin; archives never receive them. At most 32 headers, 8 KiB; no hop-by-hop or framing header. A caller header overrides the default of its name.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and non-idempotency; the description goes well beyond them, disclosing the per-item block format, ordering, that a remote URL expires in 10 minutes or at server restart (so re-call), that the remote body must never be read into context, and that a failed item does not abort the rest.

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 and a call example, then return semantics and fallback behavior, with no filler sentences. The opening phrasing ("— 1–50, unparsed") is terse to the point of being cryptic, and the return-format sentence is dense, but each clause carries needed information given there is no output 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 no output schema, the description carries the full burden of explaining return values, and it does: block header, per-item fields, local-path vs remote-URL handling, expiry, and partial-failure behavior. Nothing essential for correct invocation or post-download handling is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the `urls` field already documents the 1–50 array and input-order guarantee, so the description mostly echoes the schema. It adds a concrete example invocation but says nothing about the `headers` parameter or its origin restrictions, leaving the second parameter entirely to the schema; baseline 3 applies.

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?

Names a specific verb and resource ("Downloads any file as bytes") plus scope ("1–50, unparsed") and concrete examples (PDF, zip, image, audio, dataset). It also explicitly distinguishes itself from the `read` sibling for page/paper reading, so an agent can choose without opening either 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 both directions: use this for raw bytes of any file kind, and use `read` instead when reading a page or paper. It additionally prescribes the concrete invocation shape with an example call and tells the agent what to do with each returned form (take the local path, or curl the remote URL and verify sha256).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools