Skip to main content
Glama

localize_image

Localize an image in place by replacing its on-image text with translations.

Keeps every non-text element (layout, colours, graphics) intact and
re-renders the original text with the provided translations. Pair with
`extract_image_text` (to get the source strings) and `translate` (to
translate them with TM and brand voice) for a full image localization flow.

The localized image is saved to disk and the file path is returned — the
raw image bytes are not sent back to the model. Hosted mode returns a
download URL instead of writing to a local path.

Args:
    image_path: Public HTTPS URL (hosted) or local path (stdio) to a PNG, JPEG, or WebP image to localize.
    replacements: JSON array of {"original": "...", "translated": "..."} pairs,
        e.g. '[{"original": "Buy now", "translated": "Achetez maintenant"}]'.
    target_language_code: Target language code (e.g. "fr-FR"), used for labelling output.
    output_path: Optional path to write the localized image to. Defaults to
        "<input>.<lang>.<format>" next to the source image.
    num_images: Number of variants to generate (1-5, default 1).
    output_format: Output format — png, jpeg, or webp (default png).

Input Schema

NameRequiredDescriptionDefault
image_pathYes
num_imagesNo
output_pathNo
replacementsYes
output_formatNopng
target_language_codeYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses that only text is rewritten while layout/colours/graphics are preserved, that output goes to disk with a returned path (not raw bytes), and that hosted mode returns a download URL instead. It does not say what happens when an 'original' string is not found on the image, or whether the default output path can overwrite an existing file.

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?

Purpose and behavior are front-loaded in the first two sentences, with the parameter detail relegated to a conventional Args block. The Args formatting repeats parameter names but every line adds semantics not present in the schema, so little is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a six-parameter mutation tool with no annotations, the description covers mode-dependent input handling, output destination, variant counts, format, and the pipeline context. An output schema exists, yet the return-path-vs-download-URL note is still useful and nothing needed to call it correctly is missing.

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

Parameters5/5

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

Schema coverage is 0%, so the description must compensate and it does fully: image_path explains the HTTPS-vs-local-path distinction by mode, replacements gives the exact JSON shape with an example, output_path documents the default naming pattern, num_images gives the 1-5 range and default, and output_format lists the three accepted values.

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 ('Localize an image in place by replacing its on-image text with translations') plus the key constraint that non-text elements are preserved. This clearly separates it from extract_image_text (which pulls strings out) and translate (which produces text only).

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?

Explicitly names the companion tools and the order of the flow ('Pair with extract_image_text ... and translate ... for a full image localization flow'), so the agent knows where this sits in a pipeline. It stops short of stating when-not to use it, e.g. an image with no extractable text.

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.