upload_asset
Add PNG, JPEG, GIF, WEBP, or PDF files (max 5 MB) to the Paperboy CMS media library from a public URL or base64 bytes, then use the returned asset in image fields.
Instructions
Add a file (PNG, JPEG, GIF, WEBP or PDF, max 5 MB) to the media library from a public URL or from base64 bytes, and return the asset — set its documentId on an image field with set_field. For files on YOUR machine prefer create_upload_link: base64 through a tool call costs roughly 1 token per 2-3 bytes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| alt | No | Alt text | |
| url | No | Public http(s) URL of the file itself (not a web page showing it) | |
| site | No | Site slug or id to act in (multisite). Omit to use this server's default site. Call list_sites to see what exists — an empty tree or search usually means the wrong site, not missing content. | |
| filename | No | Display name in the media library, e.g. 'hero.jpg' | |
| dataBase64 | No | The file's bytes, base64-encoded (a data: URL prefix is accepted) |