Upload style reference
upload_style_referenceUpload an image into the signed-in user's MagicPixel References library (same as in-app References + / AI picker Save). Returns style_reference_id for generate_pixel_art and apply_with_ai. Prefer PNG/JPEG for MCP generation (WebP/GIF store OK but generation gates require PNG/JPEG). Does not spend credits.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>",
"image_base64": "<image_base64>"
},
"name": "upload_style_reference"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Display name in the MagicPixel References library. | |
| folder_id | No | Optional References folder id (create_folder with scope 'reference'). Must belong to the same project. | |
| project_id | No | Scope the reference to this project (list_projects). Omitted → user's oldest project when one exists (same visibility rule as generate_pixel_art). | |
| image_base64 | Yes | Prefer PNG or JPEG (raw base64 or data URL). WebP/GIF upload for the References library, but MCP generation (generate_pixel_art / apply_with_ai) requires PNG/JPEG so spritesheet safety can be checked. Max ~5 MB decoded. |