Skip to main content
Glama

Edit image

edit_image

Edit an existing image node with a new instruction prompt (e.g. "make the sky pink"), producing a new image node. Use redo_generation to re-roll the same inputs instead. Spends credits. Returns immediately with a new nodeId and status; poll get_generation_status until it is COMPLETED or FAILED.

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

Input Schema

NameRequiredDescriptionDefault
nodeIdYesThe image node to edit.
promptYesEdit instruction.
qualityNoImage quality. Defaults to high.
modelKeyNoImage model key from list_models. Defaults to the edited node's model; required when that node has none (an imported or uploaded image).
threadIdYesThread containing the node.
aspectRatioNoAspect ratio. Defaults to auto.
sourceFileIdsNoOptional extra input image file ids.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / modelKey / description
      Previous value: -"Optional model key from list_models."New value: +"Image model key from list_models. Defaults to the edited node's model; required when that node has none (an imported or uploaded image)."
  2. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, idempotentHint=false), the description discloses two things an agent cannot infer structurally: the call spends credits, and it is asynchronous — it returns immediately with a nodeId and status that must be polled via get_generation_status until COMPLETED or FAILED. That is exactly the extra behavioral context the annotations lack.

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?

Three tight sentences, front-loaded with the core action, then the sibling routing, then the cost and async contract. No sentence is redundant and nothing is buried.

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?

For a 7-parameter async generation tool with no output schema, the description covers what matters most: cost, the immediate return shape (nodeId, status), and the poll-until-terminal pattern. Combined with full schema coverage, an agent has everything needed to call it 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 every parameter including modelKey fallback behavior and quality/aspectRatio defaults is already documented in the schema. The description adds only an illustrative prompt example, which does not extend parameter meaning beyond the schema — baseline 3 applies.

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 names a specific verb and resource (edit an existing image node with an instruction prompt) and states the outcome (produces a new image node). It also disambiguates from redo_generation, so an agent can tell the two apart without opening either schema.

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

Usage Guidelines4/5

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

It gives an explicit when-not rule: use redo_generation to re-roll the same inputs instead, which is the closest alternative and a real source of confusion. It stops short of mentioning generate_image for brand-new images, so it is clear but not exhaustive on alternatives.

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.

Resources