Skip to main content
Glama

Edit Image

edit_image

Edit images using text prompts and optional masks. Supports data URLs, base64, or HTTPS URLs for input.

Instructions

Edit an image with a prompt and optional mask. Pass images as data URLs/base64/https URLs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nNoCount of images to generate; provider limits apply.
maskNoOptional mask image (same encoding forms as items in 'images').
sizeNoUnified size class: 'S' | 'M' | 'L'.
modelYesModel id to use for editing.
imagesYesOne or more image sources; most edit-capable models use only images[0]. Accepted forms: (1) http(s) URL, (2) local file path or file:// URL (the server will read and inline it), (3) data URL 'data:image/<type>;base64,<payload>', or (4) bare base64 string. Recommended: pass a data URL or base64 for best reliability. Supported types: PNG, JPEG, WEBP, GIF. Invalid or tiny placeholder images may be rejected by providers.
promptYesText instruction describing the edit to perform.
qualityNoQuality preference: 'draft' | 'standard' | 'high'.
providerYesProvider: 'openai' | 'openrouter' | 'azure' | 'vertex' | 'gemini'.
directoryNoOptional directory path to save edited images. If not provided, images will be saved to a temporary directory.
backgroundNoOptional background alpha for AR engines supporting transparency.
orientationNoOrientation preference: 'square' | 'portrait' | 'landscape'.
negative_promptNoOptional negative prompt honored by supporting providers.
Behavior4/5

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

Annotations are present (readOnlyHint=false, openWorldHint=true) and not contradicted. The description adds value by detailing that images can be passed as data URLs/base64/https URLs, that most edit-capable models use only images[0], and that invalid images may be rejected. This goes beyond the bare annotation to clarify input handling behavior.

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 extremely concise: two sentences immediately stating the core purpose and input format. No filler or redundancy. Every word contributes to the essential message.

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

Completeness2/5

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

Given the tool has 12 parameters, no output schema, and moderate complexity, the description is too brief. It covers image input format but omits any mention of other parameters (n, size, quality, etc.), return value expectations, model-specific behaviors (like which models support masks), or side effects (directory saving). The agent would have to rely entirely on the schema to understand all options.

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

Parameters2/5

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

Schema coverage is 100%, so the schema documents all 12 parameters. The description adds minimal parameter context: it only mentions 'prompt' and 'optional mask' generically. It does not explain 'n', 'size', 'quality', 'negative_prompt', 'directory', etc., missing an opportunity to guide usage of these important parameters.

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 verb ('Edit'), the resource ('an image'), and the mechanism ('with a prompt and optional mask'). It also specifies accepted image formats (data URLs/base64/https URLs), which distinctively separates it from sibling tools like 'generate_image' that create new images from scratch.

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

Usage Guidelines3/5

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

The description implies usage for editing existing images but provides no explicit guidance on when to prefer this over 'generate_image' or 'get_model_capabilities'. It lacks any 'when to use' or 'when not to use' statements, leaving the agent to infer context from sibling names.

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/simonChoi034/image-gen-mcp'

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