Skip to main content
Glama

Edit image

edit_image

Edit an image with a natural language prompt, optionally using a mask for targeted changes, and receive the updated image.

Instructions

Edit an image through a tai-openapi edit model.

Args: prompt: Edit instruction. The field is required; models that ignore it accept "". images: Ordered PNG, JPEG, or WebP inputs as base64 strings or data URLs. size: Optional WIDTHxHEIGHT; only pass it when capabilities input.size is true. model: Optional edit model alias; defaults to TAI_IMAGE_EDIT_MODEL. mask: Optional PNG, JPEG, or WebP mask as base64 or a data URL. Follow the capabilities input.mask policy. response_format: Image response format: "url" or "b64_json". parameters: Model-specific JSON values matching capabilities.parameters_schema.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
maskNoOptional PNG, JPEG, or WebP mask encoded as base64 or a data URL. Follow the capabilities input.mask policy.
sizeNoOptional WIDTHxHEIGHT. Pass only when capabilities input.size is true.
modelNoEdit model alias; defaults to TAI_IMAGE_EDIT_MODEL.
imagesYesOrdered PNG, JPEG, or WebP inputs encoded as base64 strings or data URLs. Use get_image_model_capabilities to determine the exact image count.
promptYesEdit instruction. This field is required; pass "" only for a model whose workflow ignores prompt.
parametersNoModel-specific JSON values. Must satisfy capabilities.parameters_schema.
response_formatNourl
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 discloses input formats, conditional parameters, and reference to model capabilities, but it does not mention potential side effects, authentication requirements, rate limits, or response structure beyond the response_format choices. This is moderate transparency but leaves gaps.

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?

The description is well-structured with a one-line purpose followed by a clear 'Args' list. All 7 parameters are covered in a readable format. It is somewhat lengthy and redundant with the schema, but every line provides useful operational guidance, making it efficient for its scope.

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?

The tool is complex (7 parameters, capabilities-driven behavior) and lacks an output schema. The description explains parameter usage but does not describe the response object, error scenarios, or end-to-end behavior. It is sufficient for basic invocation but incomplete for fully informed use.

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 86%, so the schema already documents most parameters. The description largely mirrors the schema text without adding significant new meaning. It does add 'through a tai-openapi edit model' context, but the parameter descriptions themselves are nearly identical, so no extra semantic value is provided.

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 opens with 'Edit an image through a tai-openapi edit model,' using a specific verb and resource. This clearly distinguishes it from sibling tools like generate_image and get_image_model_capabilities, making the tool's purpose unambiguous.

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?

The description includes conditional usage guidance, such as 'only pass it when capabilities input.size is true' and 'Follow the capabilities input.mask policy.' However, it does not explicitly state when to use this tool over generate_image or list_image_models, leaving the distinction implied rather than explicit.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/iat-tai/tai-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server