Skip to main content
Glama
transglot MCP server

transglot MCP server

Official
by transglot

Upsert translation

upsert_translation
DestructiveIdempotent

Create or overwrite the value of an existing key in one locale, for simple or plural keys. Records the edit as human-edited and versioned so it overrides future AI batches.

Instructions

Create or OVERWRITE the value of one existing key in one locale (it cannot create new keys; use push_file on the source locale for that). Pass value for a simple key, or plural_forms (CLDR category map, e.g. {"one": "...", "other": "..."}) for a plural key. Send exactly one of the two. A JSON project has no plural FORMS: an ICU plural or select there is ONE string, so send it as value with its selectors and argument names verbatim (e.g. {count, plural, one {# item} other {# items}}). plural_forms is for a key the project stores as separate forms (is_plural true, as gettext or Android do); splitting an ICU message into it writes a row the format cannot represent. The write is recorded as a human edit (state human_edited) and versioned server-side, so it wins over future AI batches. Overwriting the SOURCE locale marks targets stale and, if the project has auto-translate on, queues a background AI batch (spends AI word quota; its id is not returned, so check list_batches). Optional reviewer attributes the edit. Returns the fresh row. Requires the "write" ability.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "key": "<key>",
      "locale": "<locale>"
    },
    "name": "upsert_translation"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYesExact key name of an EXISTING key.
valueNoNew value for a simple (non-plural) key. Use "" to clear.
localeYesA locale configured on the project.
reviewerNoOptional human reviewer name recorded on the edit.
plural_formsNoNew values for a plural key, keyed by CLDR plural category (one, few, many, other, ...).

Output Schema

NameRequiredDescriptionDefault
rowYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.9/5.0
Behavior5/5

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

Far exceeds the annotations. It discloses that the write is recorded as a human edit (state human_edited), versioned server-side so it wins over AI batches, that overwriting the source marks targets stale, that auto-translate queues a background batch spending AI word quota whose id is not returned (check list_batches), and that it requires the "write" ability. The OVERWRITE framing is consistent with destructiveHint=true.

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?

Front-loads the core action and the key caveat, then proceeds in a logical order (value/plural_forms, format pitfalls, side effects, auth). Dense but almost every sentence carries a constraint an agent needs; the ICU/plural_forms passage is the densest and borders on hard to parse in one pass.

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?

Complete for a destructive, side-effect-heavy mutation: format decisions, batch/staleness consequences, quota cost, permission requirement, and a pointer to list_batches are all covered. Return values are noted briefly and the output schema carries the rest.

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 100%, so a 3 would be the baseline, but the description adds genuinely new semantics: mutual exclusivity of value vs plural_forms, the CLDR category map shape for plural_forms, the ICU-in-a-single-string rule with a concrete example, and that reviewer attributes the edit. None of this constraint logic appears in the schema itself.

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 with explicit scope: "Create or OVERWRITE the value of one existing key in one locale." It immediately distinguishes itself from the sibling push_file by naming what it cannot do (create new keys), so an agent can route without opening either schema.

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

Usage Guidelines5/5

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

Gives explicit when-to-use and when-not-to-use rules: use push_file for new keys, send exactly one of value or plural_forms, and use plural_forms only when the project stores the key as separate forms (is_plural true). It even names the failure mode of misusing plural_forms ("writes a row the format cannot represent").

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