Skip to main content
Glama

Edit an image

edit_image

Change a picture you give (image_url or input_images, as https:// links or data: URIs) following a prompt, with an editing model. Spends from your balance.

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": {
      "model": "<model>",
      "prompt": "<prompt>"
    },
    "name": "edit_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
nNoHow many pictures, 1 to 10. Default 1.
sizeNoWidth x height, e.g. 1024x1024, when the model lists sizes.
modelYesAn image model id.
promptYesWhat to make.
optionsNoAny other option from get_model's parameters schema.
max_costNoThe most you will pay in US dollars; a request that can cost more is refused before anything is spent.
image_urlNoThe picture to change: an https:// link or a data: URI.
aspect_ratioNoShape, e.g. 16:9, when the model lists aspect ratios.
input_imagesNoSeveral pictures to work from (https:// links or data: URIs).
return_imageNoAlso return the pictures themselves in the answer, so you can look at them.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior4/5

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

Annotations declare a non-read-only, non-destructive, open-world, non-idempotent call, and the description adds the key behavioral fact annotations cannot convey: it 'Spends from your balance', i.e. each invocation costs money. It also documents accepted input forms (https links or data: URIs). It stops short of saying whether the call is synchronous or returns a job for get_job/wait_job.

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?

Two compact sentences with the essential input forms and the cost warning front-loaded. Slight awkwardness in 'a picture you give (image_url or input_images, as https:// links or data: URIs)', but no wasted text.

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

Completeness3/5

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

For a 10-parameter tool with a nested free-form 'options' object and no output schema, the description is thinner than ideal: it never says what comes back (image bytes, URLs, or a job id to poll with get_job/wait_job). Because the schema itself is fully described, the omission is a gap rather than a failure.

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 every parameter is already documented, and the baseline is 3. The description adds only the pairing of image_url vs input_images and their accepted formats, without explaining max_cost enforcement, options passthrough, or return_image.

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

Purpose4/5

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

States a specific verb and resource ('Change a picture you give ... following a prompt') plus the mechanism ('with an editing model'). The distinction from the sibling generate_image is implied by 'change' and by requiring a source image, but never stated outright.

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?

Usage is only implied: the tool takes an existing picture, so an agent can infer it is for modifying rather than creating from scratch. There is no explicit 'use this instead of generate_image when...' guidance, no prerequisite steps (e.g., get_model first), and no exclusions.

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.