upload_document_image
Uploads a PNG, JPEG, or WebP image (up to 2 MiB before base64 encoding) to an existing document and returns its URL for insertion with save_document.
Instructions
Upload one PNG, JPEG or WebP image to an existing editable document. Send the file bytes as base64, up to 2 MiB before encoding. Insert the returned url as an image using save_document. If the result is lost, check attachments before uploading again.
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": {
"documentId": "<documentId>",
"filename": "<filename>",
"mimeType": "<mimeType>",
"contentBase64": "<contentBase64>"
},
"name": "upload_document_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes | Image file name with extension and without path segments. | |
| mimeType | Yes | MIME type of the source image. | |
| documentId | Yes | UUID returned by the corresponding list or read operation. | |
| operationId | No | Stable upload operation ID. Reuse with identical bytes and metadata after timeout to prevent duplicates. Requires WebP finalization on the server. | |
| workspaceId | No | Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes. | |
| contentBase64 | Yes | Base64 file bytes without a data: prefix. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| url | Yes | ||
| size | Yes | ||
| filename | Yes | ||
| mimeType | Yes | ||
| documentId | No |