upload_image_from_content
Upload a single image attachment to an eLabFTW experiment or item from base64-encoded content. Returns the new upload ID and size.
Instructions
Upload a single image attachment to an eLabFTW experiment or item from base64-encoded content. WRITE OPERATION — requires the update write scope. Only image/png, image/jpeg, image/gif and image/tiff are accepted. Returns the new upload id and size.
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": {
"entity_type": "<entity_type>",
"id": "<id>",
"filename": "<filename>",
"content_base64": "<content_base64>"
},
"name": "upload_image_from_content"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| comment | No | ||
| filename | Yes | ||
| mime_type | No | ||
| entity_type | Yes | ||
| content_base64 | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |