Create an Image
create_imageCreates an image from supplied HTML and CSS. Use this for a single graphic, card, or document; use create_url_image to capture an existing web page, or create_template to save a reusable design. Set content.selector to crop to a specific element. Returns asset ID, URL, and format information in item. Set include_image_data only when an inline preview is needed, or include_file to return the output as an embedded binary resource.
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": {
"content": "<content>"
},
"name": "create_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | Self-contained image content and render options. For fixed-size artwork, use selector and give the selected element explicit dimensions. | |
| include_file | No | Eagerly render and include up to 10 MiB of the original output, including PDFs, as an MCP embedded resource with uri, mimeType, and base64 blob fields. This takes longer; the asset URL remains available if the file cannot be included. Deferred renders cannot include file data. Enable only when file bytes are needed; combine with include_image_data only when both representations are needed. | |
| include_image_data | No | Eagerly render and include up to 10 MiB of image data for an inline preview. This takes longer and reports progress when the client supports progress notifications. Successful stored renders also return a URL that can be opened or embedded outside the MCP context. Use only when the user requests or needs an inline preview. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| item | No | Operation result. Check success before using this value. | |
| error | No | Error details when the operation failed; null on success. | |
| success | No | Whether the operation succeeded. If false, inspect error before retrying. |