Skip to content

MCP tools

image

Images. Images.

Last updated:

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.

PropertyValue
Read onlyno
Destructiveno
Idempotentno
Reaches outside the workspaceno

Input#

ArgumentTypeRequiredNotes
actionstring, one of 8 valuesyes
image_idstringnopattern ^img_[0-9a-hjkmnp-tv-z]{10}$
base_revisionintegerno
operationsarray of objectno
operations[].opstringno
operations[].argsobjectno
idempotency_keystringno
dry_runbooleanno
presetstringno
widthintegerno
heightintegerno
namestringno
templatebooleanno
valuesobjectno
formatstringno
qualityintegerno
from_templatestringno
pathstringno
hashstringno

Output#

A result has a text block, written for the model, and structured content with these members.

MemberTypeAlways presentNotes
textstringnoUntrusted 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/images of the workspace; a batch is atomic and undo reverts it.

Next steps#

Ask the agent

Make a thumbnail for episode 12.

The call

tools/call
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "image",
    "arguments": {
      "action": "create",
      "preset": "video_thumbnail",
      "name": "Episode 12"
    }
  }
}

The result

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.