create_upload
Upload an image with Wavegrain's MCP server: the create_upload tool needs the write permission. Inputs, outputs and an example call.
Upload an image. Permission: write. Changes saved work.
Get a 10-minute upload link for an image (JPEG, PNG or WebP, up to 15 MB), or send one under 150 KB inline. Free.
Inputs
| Input | Type | Required | Notes |
|---|---|---|---|
filename | string | yes | The file's name; it becomes the image title. up to 200 characters |
contentType | "image/jpeg" | "image/png" | "image/webp" | yes | The file's image type; send it as the Content-Type. |
bytes | integer | yes | The file size in bytes. Over 15 MB is refused: resize first. 1 to 9007199254740991 |
dataBase64 | string | no | Only for clients without a sandbox: the whole image, under 150 KB, inline. up to 220000 characters |
The fields inside an object or a list are in the JSON Schema at /developers/mcp-tools.json.
Returns
| Field | Type | Notes |
|---|---|---|
uploadId | string | The upload id, for uploadId inputs. |
uploadUrl | string | null | Send the file here; null when dataBase64 already stored it. |
method | "PUT" | null | The HTTP method for uploadUrl. |
headers | object | null | Headers to send with the file. |
expiresAt | string | null | When uploadUrl stops working, ISO 8601. |
imageId | string | null | The stored image id; null until the file is sent. |
image | object | The image object: put it in a slide's image slot as is. |
note | string | What to do next. |
Example call
Send it to POST https://wavegrain.com/api/mcp with an access key that has the write permission; Authentication shows how to make one.
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "create_upload",
"arguments": {
"filename": "<filename>",
"contentType": "image/jpeg",
"bytes": 1
}
}
}
The call shows only the required inputs, with placeholder values: put your own in.
Related tools
copy_style: Copy a tailored stylepin_style: Pin a style to a brandunpin_style: Unpin a style from a brandedit_tailored_slideshow: Edit a tailored slideshowrestore_tailored_version: Restore a tailored versionupdate_caption: Change a post caption- All 79 tools
Something wrong or missing? Write to support@wavegrain.com.