Skip to main content
Glama

translate_i18n

Translates missing i18n keys into target locale files using dictionaries, cloud providers, or agent-provided translations while preserving existing translations.

Instructions

Translate missing keys across target locale files using built-in dictionaries, optional cloud providers (DeepL, OpenAI, Gemini), or agent translations without overwriting existing translations.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "translate_i18n"
  }
}

Input Schema

NameRequiredDescriptionDefault
apiKeyNoOptional API key for the chosen cloud translation provider. If omitted, checks environment variables.
dryRunNoIf true, calculates translations and reports results without writing files to disk.
contextNoContextual clues to guide LLM translation (role, component, element tag, character limits, notes).
glossaryNoOptional brand glossary configuration with 'neverTranslate' brand names list and 'terms' dictionary (e.g. { neverTranslate: ['Antigravity'], terms: { Cart: 'Panier' } }).
providerNoOptional translation provider ('auto', 'deepl', 'openai', 'gemini', or 'dictionary'). Defaults to 'auto' (checks environment keys with non-blocking fallback to dictionary).
formalityNoGrammatical formality for AI/DeepL translations ('formal', 'informal', or 'neutral').
namespacesNoOptional list of namespaces to translate. If omitted, translates all namespaces.
projectPathNoOptional project root directory. Defaults to current working directory.
sourceLocaleNoSource locale to translate from (e.g. 'en'). Defaults to detected source locale.
targetLocalesNoTarget locales to translate to (e.g. ['fr', 'es']). Defaults to detected target locales.
providedTranslationsNoMap of target locale to translations provided by the agent (e.g. { fr: { common: { save: 'Enregistrer' } } } or { fr: { 'common:save': 'Enregistrer' } } or { fr: { save: 'Enregistrer' } }).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.6

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses the non-destructive guarantee (existing translations are not overwritten) and that dictionary fallback exists, but it says nothing about filesystem writes vs dry-run, credentials/API-key requirements for cloud providers, failure behavior, or cost/latency implications of the cloud paths.

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?

A single front-loaded sentence that wastes no words and puts the core action first. It is dense but lacks any structural separation between what the tool does and how the translation sources are prioritized.

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?

For an 11-parameter tool with nested objects, no annotations, and no output schema, one sentence leaves gaps: the agent-provided translation workflow, dry-run usage, and the auto-provider fallback chain are only visible in the schema. The rich schema coverage compensates substantially, but workflow-level completeness is missing.

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 100% and each of the 11 parameters is documented in-schema, including enums and the nested context/glossary shapes, so the baseline is 3. The description adds only the enumeration of providers and the overwrite policy; it does not clarify how providedTranslations interacts with the automatic translation paths or what namespaces/sourceLocale defaulting means in practice.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb+resource ('Translate missing keys across target locale files') and enumerates the three translation sources it can use, which separates it from sibling tools like validate_i18n or generate_i18n_plan. It stops short of explicitly naming any sibling it competes with, so an agent must infer the boundary from names alone.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Missing keys ... without overwriting existing translations' implies the usage context (filling gaps, not retranslating), which is real guidance. However, there is no explicit when-not condition and no guidance on how to choose between the four provider modes, which is the primary decision an agent must make before calling this tool.

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