Skip to main content
Glama

Media Generator — Images, Videos & Audios

edit_image_with_text

Input: An image URL and a text prompt describing the desired edit (e.g., "change background to blue").

Output: The URL of the edited image.

Functionality: This MCP tool edits an existing image based on a text instruction. It's useful for making changes like altering colors, adding or removing objects, or changing the style of an image.

Steps:

  1. Get the user_id from the request context and validate tokens.

  2. Call the Edit Image API with the provided image URL and text prompt.

  3. The API will return a JSON response containing the URL of the newly edited image.

  4. Return the edited image's URL to the user.

INSTRUCTION FOR CLIENT MODEL:

  • Extract the required input parameters 'prompt' (type: string, describing the desired edit) and 'image_url' (type: string, URL) from the user's prompt.

  • Ignore any extraneous information in the user's input.

  • Pass the extracted values to this tool as 'prompt' and 'image_url'.

  • Example: For user input "Change the background of https://example.com/image.jpg to blue", extract 'image_url' as 'https://example.com/image.jpg' and 'prompt' as 'change background to blue'.

Input Schema

NameRequiredDescriptionDefault
promptYes
image_urlYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • removedOutput schema / description
      Removed value: -"Generic wrapper for non-object return types."
  2. First observed

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose the auth path ('get the user_id from the request context and validate tokens') and that the backend is an Edit Image API returning JSON with a URL — useful context. It omits error behavior, rate limits, image size/format constraints, and reversibility, which are the traits an agent would need for a mutation-style media call.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with Input/Output, which is good, but the 'Steps' block repeats the input/output facts and adds internal implementation detail (call the API, receive JSON, return URL) that gives the caller nothing actionable, and the client-model instruction restates the parameter mapping already covered.

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?

For a two-parameter tool with an output schema present, the definition covers inputs, purpose, and the high-level flow, so nothing essential to invocation is missing. It stops short of stating failure modes or input constraints, which keeps it from being fully complete.

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 description coverage is 0%, so the description must compensate — and it does, defining 'prompt' as the text describing the desired edit and 'image_url' as the source image URL, plus a worked extraction example ('change background to blue'). Only the exact expected prompt phrasing or URL constraints remain unspecified.

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+resource ('edits an existing image based on a text instruction') and enumerates the kinds of edits supported (color, objects, style). The word 'existing' implicitly separates it from generate_image, but no sibling is named, so an agent must still infer the boundary with remove_background or upscale_image.

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?

Use cases are described ('altering colors, adding or removing objects, or changing the style'), which implies when the tool fits, and an extraction example is supplied for the caller. However, there is no explicit routing guidance versus overlapping siblings such as remove_background (also changes backgrounds) or generate_image (creates rather than edits).

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.