Skip to main content
Glama

odoo_translate_html

Translate Odoo html_translate fields by extracting translatable terms, mapping translations directly, or replacing full HTML. Supports blog posts, product descriptions, and website content.

Instructions

Write/read translations for translate=html_translate / translate=xml_translate fields. Use for: blog.post.content, product.template.website_description, hr.job.description, ir.ui.view.arch_db (covers website.page), website.menu.mega_menu_content, event.track.description, forum.forum.guidelines, res.partner.website_description. Three modes: (a) mode='extract' — READ-ONLY. translations arg ignored. Returns the list of translatable terms that Odoo's html_translate engine extracts from source_lang. Each term is an HTML-serialised translatable block (preserves inline tags like ). Use this to see what must be translated before writing. (b) mode='terms' — translations = {lang: {source_term: translated_term, ...}} Direct term map. Terms must match exactly those from mode='extract'. Calls update_field_translations() with JSONB payload. (c) mode='replace' — translations = {lang: full_html_string}. The tool writes each language's HTML through Odoo's native ORM with {'lang': } context. Odoo's html_translate engine aligns terms automatically — no manual term extraction required. This is what Odoo's Website editor does internally. Errors if field.translate is not callable. Requires Odoo 16+.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
connectionNodefault
modelYes
res_idYes
field_nameYes
translationsNoEither {lang: {term: translation}} (mode='terms') or {lang: 'full html'} (mode='replace'). Ignored for mode='extract'.
modeNoterms
source_langNoen_US
dry_runNo
mark_identical_as_translatedNoWhen True (default), terms whose target-lang value equals the source get prefixed with U+200B (zero-width-space) so Odoo stores them as explicit 'translated, kept identical' entries. Otherwise Odoo dedups them as 'untranslated', which flags technical terms (URLs, brand names, code) as needing translation in the website editor.
Behavior5/5

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

With no annotations, the description fully discloses behavioral traits: extract is read-only, terms and replace are write modes, replace uses ORM with lang context, dry_run behavior, and mark_identical_as_translated handling. It also notes Odoo 16+ requirement and error conditions.

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 fairly long but well-structured with a clear purpose statement, enumerated modes, and parameter explanations. It avoids redundancy and each section adds value, though it could be slightly more concise.

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?

Given the tool's complexity (3 modes, 9 parameters, no output schema), the description is thorough: it covers mode behavior, parameter formats, Odoo version requirement, field examples, and edge cases like dry_run and mark_identical_as_translated. No gaps remain for effective use.

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?

The input schema has low coverage (22%), but the description adds substantial meaning for key parameters like translations (format for each mode) and mark_identical_as_translated (explains why to use it). Other parameters like model, res_id, field_name are standard and well-defined by context.

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 writes/reads translations for Odoo's html_translate/xml_translate fields, lists specific field examples, and details three distinct modes. It distinguishes itself from sibling tools like odoo_translate_field by focusing on HTML-specific translation handling.

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 explicitly explains when to use each mode (extract for preview, terms for term-by-term mapping, replace for full HTML rewrite like Odoo's editor). It mentions errors for non-callable fields and Odoo version requirement but does not explicitly compare to sibling tools like odoo_translate_context_aware, leaving some implicit guidance.

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/rosenvladimirov/odoo-claude-mcp'

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