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:
Get the user_id from the request context and validate tokens.
Call the Edit Image API with the provided image URL and text prompt.
The API will return a JSON response containing the URL of the newly edited image.
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
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | ||
| image_url | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |