fetch
Retrieve 1–50 documents as Markdown by URL, DOI, ISBN, PMID/PMCID, or harvest handle. Returns content in input order, with per-item errors and a path to the complete artifact for truncated results.
Instructions
Retrieves 1–50 documents as Markdown, input order kept. Call fetch{sources:["https://…","doi:10.…","harvest:…"]} — a URL/path, DOI, ISBN, PMID/PMCID, or a handle from findWorks/searchCache; a title → findWorks first. Each item returns content (may be truncated), size, cache status, and the path to the COMPLETE artifact — read the path for the rest. A failing item carries its own error and the others still return; an empty extraction is reported as that item's error, never as a blank body.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| refresh | No | Force a fresh fetch: bypass the cache entirely, re-download, overwrite the cached artifact, and return the NEW content. | |
| sources | Yes | 1–50 things to fetch, each returned as clean Markdown in the SAME order. Each is a LOCATION or an UNAMBIGUOUS identifier of a DOCUMENT: URL / local path / file://; DOI; ISBN; PMID / PMCID; harvest: handle. Use a DIFFERENT tool for a TITLE (findWorks), an IMAGE (fetchImage), or an archive (archive). A failing item returns a descriptive per-item error and the rest still return. | |
| size_only | No | When true, fetch and cache the full content but return NO body—just {size, chars, path}; full content remains cached at path. |