download_document
Download linked files to disk, including session-gated or hotlink-protected documents, using your browser session. Saves to ~/Downloads and returns file path, size, and type.
Instructions
Download a linked file directly to disk — a PDF, spec sheet, dataset, image, archive, anything. Fetches through the user's session (Safari cookies + a browser UA + optional Referer ride along), so session-gated and hotlink-protected files come through, and names the file from Content-Disposition or the URL.
Use this when a page LINKS a document worth keeping rather than reading inline —
e.g. a solution-brief PDF found via fetch_page/page_links. Pass referer as the
page the link was on for hotlink-protected hosts. Saves to ~/Downloads by default
(override with dest_dir, or the MDBROWSE_DOWNLOADS env var). Returns the saved
path, size, and type. If a hostile WAF tarpits the direct fetch, open the page in
the reader and press d (that path fetches through the live browser engine).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | ||
| private | No | ||
| referer | No | ||
| dest_dir | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |