Skip to main content
Glama

Edit an image

edit_image

Edit an existing image with an instruction using an image-edit model. Returns signed output URLs or a job_id for the running job. Uses credits.

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>",
      "image": "<image>"
    },
    "name": "edit_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
imageYesThe HTTPS URL of the image to edit, or a list of URLs on models that take several.
modelYesImage-edit model id, such as `grok-imagine-image-2-0`.
promptYesThe edit instruction.
parametersNoExtra request fields passed through unchanged. Each model's supported parameters, ranges and defaults are listed in its model details.
wait_secondsNoSeconds to wait for the result before returning a job_id for the running job (default 40, max 50).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / image / anyOf
      Added value: +[
      +  {
      +    "format": "uri",
      +    "type": "string"
      +  },
      +  {
      +    "items": {
      +      "format": "uri",
      +      "type": "string"
      +    },
      +    "type": "array"
      +  }
      +]
    • changedInput schema / properties / image / description
      Previous value: -"The https URL of the image to edit."New value: +"The HTTPS URL of the image to edit, or a list of URLs on models that take several."
    • removedInput schema / properties / image / type
      Removed value: -"string"
  2. Changed2 schema fields changed
    • changedInput schema / properties / model / description
      Previous value: -"Image-edit model id (default `step-image-edit-2`)."New value: +"Image-edit model id, such as `grok-imagine-image-2-0`."
    • changedInput schema / required
      Previous value: -[
      -  "prompt",
      -  "image"
      -]New value: +[
      +  "model",
      +  "prompt",
      +  "image"
      +]
  3. Changed2 schema fields changed
    • changedInput schema / properties / parameters / description
      Previous value: -"Extra request fields passed through unchanged. Use get_model to see the supported parameter names, ranges, and defaults for the chosen model."New value: +"Extra request fields passed through unchanged. Each model's supported parameters, ranges and defaults are listed in its model details."
    • changedInput schema / properties / wait_seconds / description
      Previous value: -"Seconds to wait for the result before returning a job_id you can poll with get_job (default 40, max 50)."New value: +"Seconds to wait for the result before returning a job_id for the running job (default 40, max 50)."
  4. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations cover the safety profile (readOnly=false, destructive=false, openWorld=true), so the bar is lower. The description adds genuinely new behavior: outputs are signed URLs or a job_id (async, pollable via get_job) and that the call consumes credits – cost disclosure the annotations don't provide.

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?

Two short sentences, no filler, with the core purpose front-loaded and operational facts (return shape, credit cost) following. Every clause carries information.

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?

No output schema exists, but the description states the return forms (signed URL vs job_id), which is the critical missing piece for an async generation tool. It stops short of noting that a job_id requires polling or that multi-image input is model-dependent, but with full schema coverage the definition is sufficient to call correctly.

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 all five parameters including the nested 'parameters' bag and wait_seconds are already documented in the schema. The description adds no parameter-level detail beyond what is structured, so baseline 3 applies.

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 ('Edit an existing image') plus the mechanism ('with an instruction using an image-edit model'). It is naturally distinguishable from generate_image and analyze_image in the sibling list, though it never names them explicitly.

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 by the verb 'edit' – there is no explicit statement of when to choose this over generate_image or analyze_image, and no prerequisites or exclusions. The return-shape sentence ('signed output URLs or a job_id') gives some operational context but no routing guidance.

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.