Skip to main content
Glama

Update translation draft

translationDraft_update

Upsert one or more translation entries across one or more languages in a single atomic mutation. Pass a one-item array for a single-key edit. Pre-validates every entry against the source manifest — a single bad key/value rolls back the whole batch.

The language row is auto-created on first write — no separate "add language" call needed, so this is how you translate into a language the form does not have yet. Works from any page.

Writes land as suggestions in the per-language draft: the author reviews them on the translations page (accept/decline) and then publishes. Respondents keep seeing the existing published translations throughout. Do not change the form's source language or edit form content as a substitute for translating.

Input Schema

NameRequiredDescriptionDefault
formIdYes
entriesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / entries / items / properties / value / description
      Previous value: -"The translation as a Slate fragment (Descendant[]). Pass it as a NATIVE JSON array — e.g. [{\"text\":\"Bonjour\"}], or with marks/links like [{\"text\":\"more \"},{\"type\":\"link\",\"url\":\"https://x.com\",\"children\":[{\"text\":\"here\"}]}] — so you never hand-escape nested JSON (escaping a stringified fragment is the #1 cause of failed link/underline translations). A JSON-stringified array string is also accepted for back-compat. Even plain text MUST be an array of leaves, never a bare prose string. Mirror the source fragment's structure + marks (bold/italic/underline/strikeThrough/links/variables); only translate the leaf text. For email body keys (`email.*.body`), preserve the paragraph/block roots from `sourceFragment`; do not write leaf-only `[{\"text\":\"...\"}]`."New value: +"The translation as a rich-text fragment (Descendant[]). Pass it as a NATIVE JSON array — e.g. [{\"text\":\"Bonjour\"}], or with marks/links like [{\"text\":\"more \"},{\"type\":\"link\",\"url\":\"https://x.com\",\"children\":[{\"text\":\"here\"}]}] — so you never hand-escape nested JSON (escaping a stringified fragment is the #1 cause of failed link/underline translations). A JSON-stringified array string is also accepted for back-compat. Even plain text MUST be an array of leaves, never a bare prose string. Mirror the source fragment's structure + marks (bold/italic/underline/strikeThrough/links/variables); only translate the leaf text. For email body keys (`email.*.body`), preserve the paragraph/block roots from `sourceFragment`; do not write leaf-only `[{\"text\":\"...\"}]`."
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing that writes land as suggestions subject to author review-then-publish, that respondents continue seeing the existing published translations, and that invalid entries roll back the whole batch via source-manifest pre-validation. These are consequential behavioral traits not derivable from readOnlyHint=false/destructiveHint=false.

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 upsert purpose in the first sentence and orders the rest by importance (array usage, atomicity, auto-create, suggestion lifecycle, exclusions). It is somewhat long across four paragraphs, but nearly every sentence carries actionable information rather than filler.

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?

For a mutation tool with no output schema, the description covers the lifecycle of a write (suggestions, review, publish), rollback behavior, and the source-hash staleness mechanism implied by the schema. It does not describe the mutation's response payload, but the critical operational context an agent needs is present.

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?

Top-level schema coverage is low (formId/entries undescribed), but the description compensates by explaining the one-item-array usage for single edits and the pre-validation/rollback semantics of the entries array. Nested fields (key/value/sourceHash) are deeply documented in the schema itself, so the description's added value is meaningful but not exhaustive on formId.

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 ('Upsert ... translation entries across one or more languages in a single atomic mutation') and clarifies scope ('in a single atomic mutation', single vs. batch). An agent can immediately tell this is the write path for translation entries, distinct from translationDraft_get/publish.

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?

Explicitly says when to pass a one-item array, that the language row is auto-created ('no separate add language call needed'), that it works from any page, and gives a clear exclusion: 'Do not change the form's source language or edit form content as a substitute for translating.' Routing and boundaries are fully specified.

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.