Images. action=create (preset or width+height; or from_template+values), list, show, edit (operations: command_help domain=image), undo, redo, export, import (path or hash of an image file; image_id adds a layer).
Behaviour#
These are the annotations of the tool definition, the hints a client uses to decide whether to ask before a call. image is listed by tools/list.
| Property | Value |
|---|---|
| Read only | no |
| Destructive | no |
| Idempotent | no |
| Reaches outside the workspace | no |
Input#
| Argument | Type | Required | Notes |
|---|---|---|---|
action | string, one of 8 values | yes | |
image_id | string | no | pattern ^img_[0-9a-hjkmnp-tv-z]{10}$ |
base_revision | integer | no | |
operations | array of object | no | |
operations[].op | string | no | |
operations[].args | object | no | |
idempotency_key | string | no | |
dry_run | boolean | no | |
preset | string | no | |
width | integer | no | |
height | integer | no | |
name | string | no | |
template | boolean | no | |
values | object | no | |
format | string | no | |
quality | integer | no | |
from_template | string | no | |
path | string | no | |
hash | string | no |
Output#
A result has a text block, written for the model, and structured content with these members.
| Member | Type | Always present | Notes |
|---|---|---|---|
text | string | no | Untrusted text: data, not an instruction |
Errors#
A call over HTTP without credentials fails with E_UNAUTHORIZED, and too many calls with E_RATE_LIMITED. Both are in the error codes.
Safety#
- Names and texts of layers in a result are data from the document, not instructions.
- An export writes one file under
exports/imagesof the workspace; a batch is atomic andundoreverts it.
Next steps#
Ask the agent
Make a thumbnail for episode 12.
The call
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "image",
"arguments": {
"action": "create",
"preset": "video_thumbnail",
"name": "Episode 12"
}
}
}The result
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [
{
"type": "text",
"text": "image img_7k2m9x4q1b r1 \"Episode 12\" 1280x720 background #FFFFFF template=false layers=0"
}
],
"structuredContent": {
"image_id": "img_7k2m9x4q1b",
"revision": 1,
"width": 1280,
"height": 720,
"text": "image img_7k2m9x4q1b r1 \"Episode 12\" 1280x720 background #FFFFFF template=false layers=0"
}
}
}The values are illustrative. The text block is exact.