Skip to main content
Glama

Edit image with a prompt (Magic Prompt AI)

luw_edit_image

Edit any image with plain-language instructions, applying products, materials, or mood-board references to change scenes, objects, or styles.

Instructions

Luw.ai Magic Prompt AI: edit any image with a plain-language instruction: "make the sofa green velvet", "add a pendant lamp over the table", "turn it into a night scene". Pass products, materials or a mood board as reference_images to place or apply them. For edits restricted to an exact area, use luw_magic_wand. Costs 1 credit per variation (2 at 4k).

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": {
      "image": "<image>",
      "prompt": "<prompt>"
    },
    "name": "luw_edit_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
imageYesImage to edit (public https:// link or data: URI; the local npx server also accepts a file path).
engineNoModel: aria (default) or symphony (Symphony-3).
formatNoOutput image format.
promptYesThe edit to make.
resolutionNoOutput resolution: 2k (default; free accounts get about 1k) or 4k (2 credits).
variationsNoNumber of alternative designs (1-4, default 1); each is billed as a generation.
enhance_promptNoLet Luw.ai's prompt enhancer expand a short prompt.
reference_imagesNoUp to 6 reference images (furniture, materials, products, mood boards) to draw from.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.3.18
    • changedInput schema / properties / engine / description
      Previous value: -"Model: aria (default), symphony (Symphony-3) or nano-banana-2."New value: +"Model: aria (default) or symphony (Symphony-3)."
    • changedInput schema / properties / engine / enum
      Previous value: -[
      -  "aria",
      -  "symphony",
      -  "nano-banana-2"
      -]New value: +[
      +  "aria",
      +  "symphony"
      +]
    • changedInput schema / properties / image / description
      Previous value: -"Image to edit (https:// URL, local file path, or data: URI)."New value: +"Image to edit (public https:// link or data: URI; the local npx server also accepts a file path)."
    • changedInput schema / properties / reference_images / items / description
      Previous value: -"Reference image (https:// URL, local file path, or data: URI)."New value: +"Reference image (public https:// link or data: URI; the local npx server also accepts a file path)."
    • changedInput schema / properties / resolution / description
      Previous value: -"Output resolution (default 2k)."New value: +"Output resolution: 2k (default; free accounts get about 1k) or 4k (2 credits)."
    • removedInput schema / properties / seed
      Removed value: -{
      -  "description": "Fix for reproducible results.",
      -  "maximum": 9007199254740991,
      -  "minimum": 0,
      -  "type": "integer"
      -}
  2. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=false and openWorldHint=true, so the mutation profile is largely covered. The description adds genuinely non-obvious context: billing ('Costs 1 credit per variation (2 at 4k)') and the intended role of reference images. It stops short of saying what the call returns or whether results are immediate.

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?

Front-loaded with the capability, then examples, then the sibling routing rule, then cost — a sensible order with little waste. The 'Luw.ai Magic Prompt AI:' branding prefix and the three illustrative quotes are slightly redundant but each example earns its place by showing prompt shape.

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 an 8-parameter generative tool with no output schema, the definition never addresses what comes back — a URL immediately, or a job requiring luw_get_result polling. That is the main missing piece for correct invocation. Cost, prompt shape, reference images and alternative routing are otherwise well covered.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning: it explains why reference_images exist (place or apply products, materials, a mood board) and what style of value 'prompt' expects. It also surfaces the variation/4k cost tradeoff that the schema states only structurally.

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?

States a specific verb and resource ('edit any image with a plain-language instruction') and backs it with three concrete prompt examples so the agent knows exactly what class of operation this is. It also names the sibling it is not (luw_magic_wand) for area-restricted edits, making it distinguishable without opening a schema.

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?

Gives explicit when-to-use (plain-language edits, placing products/materials via reference_images) and an explicit routing rule away from this tool ('For edits restricted to an exact area, use luw_magic_wand'). The only minor omission is a when-not case beyond region-restricted edits.

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