Skip to main content
Glama

Download Media

download_media

Download attachments needed for a task from authenticated pages using saved browser cookies, returning local paths, sizes, and per-file errors; run after auth_fetch.

Instructions

Download only attachments needed for the user's task using saved browser cookies. Returns local paths, sizes, and per-file errors. Check downloaded before reporting success. Cookies may not cover sites that require JavaScript-generated authorization headers. Use include_preview to return small PNG/JPEG/WebP images directly to the AI; larger files need a local file viewer. Run after auth_fetch finishes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlsYesOne or more URLs to download
output_dirNoOptional directory to save files to. Defaults to ~/.auth-fetch-mcp/downloads/<timestamp>/
include_previewNoInclude small PNG/JPEG/WebP images as MCP image content, within a shared 1 MiB preview budget. Local paths are always returned.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesYes
totalYes
statusYes
directoryYes
downloadedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv4.0.0
    • addedInput schema / properties / include_preview
      Added value: +{
      +  "default": false,
      +  "description": "Include small PNG/JPEG/WebP images as MCP image content, within a shared 1 MiB preview budget. Local paths are always returned.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / urls / maxItems
      Added value: +50
    • addedInput schema / properties / urls / minItems
      Added value: +1
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "directory": {
      +      "type": "string"
      +    },
      +    "downloaded": {
      +      "type": "number"
      +    },
      +    "files": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "error": {
      +            "type": "string"
      +          },
      +          "localPath": {
      +            "type": "string"
      +          },
      +          "preview_included": {
      +            "type": "boolean"
      +          },
      +          "size": {
      +            "type": "number"
      +          },
      +          "url": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "url"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "status": {
      +      "enum": [
      +        "ok",
      +        "partial",
      +        "error"
      +      ],
      +      "type": "string"
      +    },
      +    "total": {
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "status",
      +    "directory",
      +    "downloaded",
      +    "total",
      +    "files"
      +  ],
      +  "type": "object"
      +}
  2. Added

TDQS

A4.7/5.0
Behavior4/5

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

Annotations (readOnlyHint=false, destructiveHint=false, openWorldHint=true) cover the mutation/open-world profile, and the description adds genuinely new context: cookie limitations against JavaScript-generated authorization headers, per-file error reporting, and the 1 MiB preview budget behavior. Does not contradict the write-hint by hiding that files land on disk.

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?

Front-loaded with the core action, then limitation, then verification requirement, then the preview branch. Every sentence carries actionable information with no filler.

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?

An output schema exists, so return shapes need not be restated, yet the description still notes the returned fields and error surface. Combined with the auth caveat and sequencing relative to auth_fetch, an agent has everything needed 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 100%, so the baseline is 3, but the description adds real meaning to include_preview (returns small PNG/JPEG/WebP to the AI within a budget; larger files require an external viewer) beyond what the schema states. output_dir and urls remain schema-only.

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 (download) and resource (attachments/media) plus the mechanism (saved browser cookies) and scope constraint (only what the task needs). It is clearly distinguishable from siblings like auth_fetch and list_pages.

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 sequencing ('Run after auth_fetch finishes'), a success-verification instruction ('Check downloaded before reporting success'), and a conditional routing rule for include_preview (small images inline vs. larger files needing a local viewer). Covers both when to use and how to branch.

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