iterateImage
Refine or edit existing images by changing colors, backgrounds, or styles; apply crops and fix visual issues with specific prompts.
Instructions
Refine, modify, or create variations of an existing generated image.
Use this to:
Edit specific parts of an image ("change the background to blue", "add a title")
Apply style changes ("make it more minimalist", "use darker colors")
Fix issues ("remove the text", "make the icon larger")
Crop the image to specific coordinates
For diagram iterations:
Include the original Mermaid/D2/Vega source in your prompt to preserve structure
Be explicit about visual issues (e.g., "the left edge is clipped")
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": {
"sessionId": "<sessionId>",
"assetId": "<assetId>",
"prompt": "<prompt>"
},
"name": "iterateImage"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cropX1 | No | Crop: X coordinate of the top-left corner in pixels | |
| cropX2 | No | Crop: X coordinate of the bottom-right corner in pixels | |
| cropY1 | No | Crop: Y coordinate of the top-left corner in pixels | |
| cropY2 | No | Crop: Y coordinate of the bottom-right corner in pixels | |
| prompt | Yes | Detailed instruction for the iteration. Be specific about what to change. Examples: 'Change the primary color to #0033A0', 'Add a subtle drop shadow' | |
| assetId | Yes | The asset UUID of the image to iterate on | |
| sessionId | Yes | The session UUID containing the image to iterate on |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | ||
| width | No | ||
| format | No | ||
| height | No | ||
| status | Yes | ||
| assetId | Yes | ||
| sessionId | Yes | ||
| parentAssetId | Yes |