Skip to main content
Glama

editImage

Modify an existing image according to text instructions: supply a source image (URL or base64) and a prompt describing the changes (e.g. "add clouds", "warmer color scheme"), with an optional reference_image for extra style or content guidance. The job result is an array of image results, each with a url; request n (1-4) to control the number of edited variations. Provided images are uploaded and validated, and any image larger than 15MB is rejected with HTTP 400. Credits are held when the job is accepted and refunded if it fails or is cancelled; the charge scales with the number of images produced. Use editImage to transform a specific existing image; use createImage to generate from text alone, generateWithStyle to borrow a reference's art style, and removeBackground for the dedicated background-removal case. Pass an optional request_id to tag the results so you can retrieve them later via listGenerations (type image). Async generation job: returns {id, status} - poll getApiJob (job and credit contract: see the server instructions).

Credits: This endpoint consumes 0.5 credits per result.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestBodyYesPayload for editing an existing image based on text instructions

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / requestBody / properties / request_id / description
      Previous value: -"Optional client-provided identifier, unique per request. Re-sending the same request_id returns the existing job instead of generating again. Also usable with the results endpoint."New value: +"Optional client-provided identifier, unique per request. Re-sending the same request_id returns the existing job instead of generating again. Also usable as the request_id filter of listGenerations."
  2. Changed4 schema fields changed
    • removedInput schema / properties / requestBody / properties / augment_prompt / default
      Removed value: -true
    • changedInput schema / properties / requestBody / properties / augment_prompt / description
      Previous value: -"Augment the prompt behind the scenes. Disable to have more control."New value: +"Augment the prompt behind the scenes. Disable to have more control. Default: true."
    • removedInput schema / properties / requestBody / properties / n / default
      Removed value: -1
    • changedInput schema / properties / requestBody / properties / n / description
      Previous value: -"Number of edited variations to generate (1-4)."New value: +"Number of edited variations to generate (1-4). Default: 1."
  3. Changed1 schema field changed
    • changedInput schema / properties / requestBody / properties / request_id / description
      Previous value: -"Optional client-provided identifier for this request. Use this to retrieve results later via the results endpoint."New value: +"Optional client-provided identifier, unique per request. Re-sending the same request_id returns the existing job instead of generating again. Also usable with the results endpoint."
  4. Changed1 schema field changed
    • addedInput schema / properties / requestBody / properties / request_id
      Added value: +{
      +  "description": "Optional client-provided identifier for this request. Use this to retrieve results later via the results endpoint.",
      +  "type": "string"
      +}
  5. Added

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It thoroughly explains the upload/validation process, 15MB limit with HTTP 400 error, credit holding/refunding mechanism, async job behavior, and polling via getApiJob. This goes far beyond what the schema conveys.

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

Conciseness4/5

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

The description is comprehensive but somewhat extended, touching on many aspects including usage, credits, and async behavior. It is front-loaded with the core purpose and usage, and the additional details are relevant. However, it could be slightly trimmed to avoid verbosity, though the structure is logical.

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?

The description is complete for a complex tool with async behavior, credit implications, and multiple parameters. It covers the critical aspects: how to use, prerequisites, error conditions, credits, polling, and result format. Nothing an agent needs to invoke it correctly is missing, especially given the rich schema.

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?

The schema already provides detailed descriptions for most parameters (image, prompt, n, request_id, augment_prompt, reference_image), achieving 100% coverage. The description adds context on how reference_image affects style/content and how request_id can be used with listGenerations, but this is a minor enhancement over the schema.

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: 'Modify an existing image according to text instructions' with specific examples of prompts. It distinguishes itself from siblings by explicitly naming alternatives and when to use them, such as createImage for text-alone generation and removeBackground for background removal.

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 provides explicit guidance on when to use this tool versus alternatives, stating 'Use editImage to transform a specific existing image; use createImage to generate from text alone, generateWithStyle to borrow a reference's art style, and removeBackground for the dedicated background-removal case.' It also notes the async nature and polling requirements.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.