# image

> Images. Images.

Source: https://stuarty.com/docs/mcp/tools/image/

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

- [`E_VALIDATION`](/docs/reference/error-codes#e_validation)
- [`E_NOT_FOUND`](/docs/reference/error-codes#e_not_found)
- [`E_REVISION_CONFLICT`](/docs/reference/error-codes#e_revision_conflict)
- [`E_SLOT`](/docs/reference/error-codes#e_slot)
- [`E_LINT_BLOCKING`](/docs/reference/error-codes#e_lint_blocking)
- [`E_NOTHING_TO_UNDO`](/docs/reference/error-codes#e_nothing_to_undo)

A call over HTTP without credentials fails with `E_UNAUTHORIZED`, and too many calls with `E_RATE_LIMITED`. Both are in the [error codes](/docs/reference/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

- [Connect a client](/docs/mcp/connect)
- [The MCP tools](/docs/mcp/tools)

**Ask the agent**

> Make a thumbnail for episode 12.

**The call**

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

**The result**

```json
{
  "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.
