Upload Media Inline (Popcraft)
popcraft_media_upload_inlineUpload a SMALL local file (icon, thumbnail, screenshot, short audio clip) by sending its bytes as base64 in this call — the bytes travel over this MCP connection, so it needs NO access to any other host and no shell. Returns a media_id that is ready immediately — no popcraft_media_confirm step — to pass as a medias[].value for popcraft_generate_image / popcraft_generate_video / popcraft_generate_audio. NOT FOR VIDEO: the base64 payload goes in this tool's ARGUMENTS, so you must generate every character of it, and even a 1 MB file is roughly 1.4 million characters. Practical ceiling is a few hundred KB; the hard limit is 20 MB. For video, or any file you would not want to type out in full, use popcraft_media_upload and RUN one of the shell recipes it returns — that streams the file from disk and never puts the bytes in your context. Never tell the user to upload a file through the website instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | The file bytes, base64-encoded. A full `data:<mime>;base64,...` URI is accepted too. Send the WHOLE file — a truncated payload is rejected, not silently stored. | |
| sha256 | No | Optional hex sha256 of the raw (pre-base64) file bytes. Pass it and the server verifies the payload arrived intact — worth it for multi-MB video. | |
| filename | Yes | Original filename, e.g. clip.mp4 — cosmetic only; the stored path is unique regardless | |
| content_type | Yes | MIME type of the file, e.g. image/png, video/mp4, audio/mpeg. Accepted: jpeg/png/webp/gif images, mp4/webm/mov video, mp3/wav/ogg/aac/m4a audio, glb/fbx 3D — anything else is rejected. |