Skip to main content
Glama

iterateImage

Refine generated images by editing specific parts, applying style changes, fixing issues, or cropping to coordinates. Use detailed prompts to modify existing images while preserving structure.

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

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

With no annotations provided, the description carries the full burden. It describes the tool's behavior as modifying existing images, implying mutation, but lacks details on permissions, rate limits, or response format. The diagram iteration section adds useful context, but overall behavioral disclosure is incomplete for a mutation tool.

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 and front-loaded with a clear purpose statement, followed by bullet points for usage and numbered steps for diagrams. Every sentence earns its place by providing actionable guidance without redundancy, making it efficient and easy to parse.

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

Completeness4/5

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

Given the tool's complexity (mutation with 7 parameters) and no annotations or output schema, the description does a good job covering purpose and usage. However, it lacks details on behavioral aspects like error handling or response format, leaving some gaps in completeness for an agent to invoke it confidently.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all 7 parameters thoroughly. The description adds minimal value beyond the schema, mentioning 'crop the image to specific coordinates' which aligns with crop parameters but doesn't provide additional syntax or format details. Baseline 3 is appropriate given high schema coverage.

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 clearly states the tool's purpose with specific verbs ('refine, modify, or create variations') and resource ('existing generated image'), distinguishing it from siblings like 'generateImage' (creation) and 'exportImageAsset' (export). It provides concrete examples of use cases, making the purpose unambiguous.

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

Usage Guidelines5/5

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

The description explicitly lists when to use this tool ('Edit specific parts', 'Apply style changes', 'Fix issues', 'Crop'), including a dedicated section for diagram iterations with numbered steps. It distinguishes from siblings by focusing on iteration of existing images rather than generation or export, providing clear contextual guidance.

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