Skip to main content
Glama

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:

  1. Include the original Mermaid/D2/Vega source in your prompt to preserve structure

  2. Be explicit about visual issues (e.g., "the left edge is clipped")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cropX1NoCrop: X coordinate of the top-left corner in pixels
cropX2NoCrop: X coordinate of the bottom-right corner in pixels
cropY1NoCrop: Y coordinate of the top-left corner in pixels
cropY2NoCrop: Y coordinate of the bottom-right corner in pixels
promptYesDetailed instruction for the iteration. Be specific about what to change. Examples: 'Change the primary color to #0033A0', 'Add a subtle drop shadow'
assetIdYesThe asset UUID of the image to iterate on
sessionIdYesThe session UUID containing the image to iterate on

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNo
widthNo
formatNo
heightNo
statusYes
assetIdYes
sessionIdYes
parentAssetIdYes
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations indicate readOnlyHint=false (mutation) and destructiveHint=false. The description adds value by detailing behaviors like editing parts, style changes, cropping, and fixing issues, and advising to include source for diagrams to preserve structure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with bullet points and numbered steps, front-loading the main purpose. Every sentence adds value, and it is appropriately concise without being terse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (7 parameters, 3 required, output schema present), the description covers editing, cropping, and diagram iterations with guidance on preserving source. It fulfills all informational needs for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, providing descriptions for all 7 parameters. The description enhances this with examples for the prompt parameter (e.g., 'Change the primary color to #0033A0') and clarifies the cropping coordinates as top-left and bottom-right, aiding the agent.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses specific verbs like 'refine', 'modify', and 'create variations' on an existing image, clearly distinguishing it from sibling tools like generateImage (new image) and exportImageAsset (exporting). The list of use cases further clarifies the scope.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states 'Use this to:' followed by concrete scenarios, and provides a specific 'For diagram iterations:' section with numbered steps. While it doesn't explicitly state when NOT to use, the purpose is clear and contrasts well with siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/securecoders/opengraph-io-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server