Skip to main content
Glama

Edit an existing generation with a plain-language instruction

edit_image

Changes a finished image from a plain-language instruction: add or remove something, or swap a face. Takes free text. Spends credits; returns a task id. Refuses real or famous people's likenesses.

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": {
      "generationId": "<generationId>",
      "kind": "<kind>",
      "instruction": "<instruction>"
    },
    "name": "edit_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindYes"edit" for a general change, "remove" to delete something, "add" to insert a new person, "face" to face-swap an existing person's identity. Adding a non-person object (e.g. more goats) is "edit", not "add" — "add" is specifically for inserting a NEW PERSON.
requestIdNoOptional. A unique id you choose for this job (a UUID is fine). If the call is repeated with the same requestId within 24 hours, the existing job comes back instead of a new render, so a retry is never charged twice.
instructionYesWhat to change, specifically. E.g. "add 4 more goats grazing in the middle distance, same breed as the one already in frame" or "remove the walking stick" or "change the sky to overcast".
generationIdYesThe generation_id from a completed generate_image or edit_image call — the photo to edit.
referenceImageUrlsNoOptional reference photos (e.g. from list_reference_images) — an identity/appearance source for a "face" or "add" instruction. Must already be hosted on TASVR's own Supabase Storage.

Output Schema

NameRequiredDescriptionDefault
statusYes
task_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations only cover the safety profile (readOnlyHint, destructiveHint, openWorldHint); the description adds genuinely new behavior: credit spend, an async task id return, and a content policy refusing real or famous people's likenesses. It stops short of saying what polling tool to use next or what a refusal looks like to the caller.

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?

Four short sentences, front-loaded with the action and followed by cost and policy caveats. 'Takes free text' is mildly redundant with the instruction parameter but the rest is dense and waste-free.

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?

With an output schema present and full parameter coverage, the description only needs to carry cost, policy, and async behavior — which it does. The remaining gap is the follow-up flow (that a task id must be polled via get_generation_status), which an agent must infer.

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 the enum routing rules, requestId idempotency, and referenceImageUrls hosting constraint are already fully documented in the schema. The description only contributes 'Takes free text', adding no parameter meaning beyond structured fields.

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 — 'Changes a finished image' — and enumerates the operation kinds (add, remove, face swap). The word 'finished' implicitly separates it from generate_image, but no sibling is named 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 implied by 'finished image' and the cost note ('Spends credits') hints at estimate_cost, but the description never states when to prefer edit_image over generate_image, preview_generation, or plan_shot, and gives no explicit when-not-to-use condition.

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