fetch_asset
Download a single asset file (image, PDF, font, etc.) from its URL, save it to disk, and return file details as JSON. Ideal for fetching one specific file with its direct URL.
Instructions
Download a single asset file (image, PDF, font, CSS, any file) from its URL through the same unlock ladder as read_url, save it to disk, and return {path, content_type, bytes} as JSON. Use this for one specific file by its direct URL; to pull a whole page's assets at once use grab_site instead. Saves into out_dir when given, otherwise the current directory. Returns an 'Error: ...' string on failure.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Direct URL of the asset file to download. | |
| out_dir | No | Directory to save into (optional; defaults to the current directory). |