Skip to main content
Glama

Download a file to disk

download
Idempotent

Save a file from a URL to a temporary local directory and get its path, size, type, and checksum. Use when another tool needs a real file on disk.

Instructions

Save a file from a URL to a local, auto-expiring download directory.

Downloads are enabled by default and saved under
`SEARCH_MCP_CACHE_DIR/downloads`. Set `SEARCH_MCP_DOWNLOAD_ENABLED=false`
to disable them or `SEARCH_MCP_DOWNLOAD_DIR` to override the destination.

Best for:
- Keeping an actual file (installer, dataset, archive, image) rather than
  its text.
- Handing a path to another tool that needs a real file on disk.

Not recommended for:
- Reading a document's contents -> use `read_doc`, which parses it without
  touching the filesystem.
- Looking at a web page -> use `fetch`.
- Viewing an image -> use `fetch(inline=True)`.

Returns:
- markdown (default): where the file was saved, its size and type.
- json: {url, saved_path, media_type, bytes_size, sha256, expires_in_hours}.
  An expires_in_hours value of 0 means TTL cleanup is disabled.

Retention: files older than SEARCH_MCP_DOWNLOAD_TTL_HOURS (default 24) are
deleted before the next download and at startup. A value of 0 disables TTL
cleanup. Otherwise, treat the path as short-lived and copy it elsewhere if
you need to keep it.

Args:
    url: Absolute http(s) URL of the file to save.
    format: "markdown" or "json".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes
formatNomarkdown

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.12.0
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "result": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "additionalProperties": true,
      -          "type": "object"
      -        }
      -      ],
      -      "title": "Result"
      -    }
      -  },
      -  "required": [
      -    "result"
      -  ],
      -  "title": "downloadOutput",
      -  "type": "object"
      -}New value: +null
  2. Addedv0.9.1

TDQS

A4.9/5.0
Behavior5/5

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

Beyond annotations, the description discloses filesystem effects, default-enabled behavior, environment variable controls, auto-expiring paths, TTL cleanup, and return details. This is substantial additive transparency consistent with readOnlyHint=false and there is no contradiction with the annotations.

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?

The description is organized into clear labeled sections (best for, not recommended, returns, retention, args) with no filler. The core action is front-loaded, and every section earns its place by providing actionable information.

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?

Given the lack of an output schema, the description provides both markdown and JSON return shapes, including the sha256 and expiry fields. It also covers retention, configuration, and use cases, making it complete enough for an agent to invoke safely and 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?

With 0% schema description coverage, the description compensates by specifying that url must be an absolute http(s) URL and by explaining format through the Returns section. It could go slightly deeper on format semantics, but the return value details largely close the gap.

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?

The description states a specific verb and resource: 'Save a file from a URL to a local, auto-expiring download directory.' It clearly differentiates from siblings like read_doc and fetch by saying it keeps an actual file rather than parsing content or viewing a page.

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?

The 'Best for' and 'Not recommended for' sections explicitly name alternatives: read_doc for document content, fetch for web pages, and fetch(inline=True) for images. This gives an agent unambiguous when-to-use versus when-not-to-use guidance.

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