Skip to main content
Glama

localize_template

Create a localized version of a template: translate text nodes, override images, and set RTL direction for a target locale. Publish with validation.

Instructions

Create a localized version of an existing template for a target market.

translations format: [{"id": "node_id", "translated_text": ""}, ...]

translated_text is the INNER content of the HTML element only — do not include the outer tag. The outer tag and all CSS attributes are preserved automatically. Inline HTML is supported: , , , may be used freely.

Jinja expression rules:

  • Preserve {{...}} structure exactly: variable names, filters, attribute keys

  • You MAY adapt the string VALUE inside |default('value') to sound natural

  • Do NOT modify {%...%} control flow expressions

image_overrides: Optional list of image URL/alt swaps. Each entry: {"id": "img_0", "url": "...", "alt_text": "...", "link_url": "..."}. IDs come from analyze_template's images list.

rtl: Set to True for right-to-left locales (Arabic, Hebrew, Farsi, etc.).

source_version: Integer revision number from search_templates. Pass this to ensure the correct HTML version is fetched on cache miss.

If publish=True and any localizable nodes have no translation, publishing is blocked. Set force=True to publish anyway.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
source_external_template_idYes
translationsYes
target_localeYes
target_template_idYes
target_template_nameYes
target_template_versionYes
subjectYes
sender_nameYes
created_byYes
preview_textNo
publishNo
forceNo
image_overridesNo
rtlNo
source_versionNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations provided, the description effectively discloses key behaviors: translations must include node IDs and inner HTML only, Jinja rules, image override format, RTL support, source versioning, and the publish/force logic. It does not describe where the localized template is saved or permissions needed.

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 bullet points for different sections (translations, Jinja, image_overrides, etc.). It is front-loaded with the main purpose. While slightly lengthy, every sentence provides value, making it effective.

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?

Given the complexity (15 params, 9 required) and no annotations, the description covers translations, image overrides, RTL, source version, and publishing behavior. Minor gaps exist for some required parameters and the exact storage destination. The presence of an output schema partially compensates for return details.

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 coverage is 0%, so the description carries the full burden. It adds meaning for translations, image_overrides, rtl, source_version, publish, and force (6 of 15 params). However, required parameters like source_external_template_id, target_template_id, target_template_name, target_template_version, subject, sender_name, created_by, and preview_text are not explained beyond their schema names.

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 clearly states the tool's purpose: 'Create a localized version of an existing template for a target market.' It uses a specific verb ('localize') and resource ('template'), differentiating it from sibling tools like analyze_template or build_email_template.

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 provides detailed usage context, including formatting rules for translations, Jinja, and image_overrides, as well as conditions for publish and force. However, it does not explicitly state when NOT to use this tool or compare it to alternatives like patch_template_text or update_template.

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/poddubnyoleg/moengage_mcp'

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