Fetch to Vault
fetchDownload a file from any HTTP/HTTPS URL and save it to the vault as a markdown note or attachment, enabling MCP-to-MCP transfer for content too large to pass through the LLM context.
Instructions
Download a file from a URL and save it to the vault.
Fetches content from an HTTP/HTTPS URL and writes it as a note or attachment. Designed for MCP-to-MCP file transfer when content is too large to pass through the LLM context window.
Context cost: zero for the bytes themselves — the file is
downloaded server-side and saved to the vault. After a successful
fetch, reference the file by its path (call read(path) only
for small results, otherwise pass the path to other tools).
For .md paths: the response is decoded as UTF-8 text and saved as a markdown note with optional frontmatter. The search index is updated immediately.
For other paths: the response is saved as a binary attachment. The existing attachment size limit applies.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Source URL to download from. Only http:// and https:// schemes are allowed. SSRF protection (via pvl-core's hardened ``fetch_url``, #862): the host is resolved and rejected unless every address is publicly routable (private, loopback, link-local, CGNAT/shared, and reserved ranges are all blocked), the validated IP is pinned for the connection (closing DNS rebinding), and ambient HTTP(S)_PROXY / .netrc settings are ignored. Redirects ARE followed (changed in #1116; through v3.1.0 a redirect was refused), and every hop repeats the whole chain above — a ``Location`` pointing at an internal target is refused exactly as a directly supplied one is. Because of that, the bytes need not come from the host in *url*: check the returned ``final_url`` when the source host matters. | |
| path | Yes | Destination path in the vault (e.g. "notes/report.md" or "assets/diagram.png"). Extension determines handling: .md for notes, anything else for attachments. | |
| if_match | No | Optional etag from a previous 'read' call for optimistic concurrency. Omit to write unconditionally. | |
| timeout_s | No | Download timeout in seconds (default 30). Increase for large files on slow connections. | |
| frontmatter | No | Optional YAML frontmatter dict for .md files, e.g. {"title": "Report", "source": "http://..."}. Ignored for attachments. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||