Skip to main content
Glama

Translate the site

translate
DestructiveIdempotent

Show the site in other languages at //... Add a language, read a page, item or region's words, then save a translation of each (batch: many in one call). Structure is shared across languages, and a page or item with no translation stays at its original address. Translations are part of the draft and go live on publish. Add a language-switcher block to the header so visitors can change language.

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": {
      "site_id": "<site_id>",
      "action": "<action>"
    },
    "name": "translate"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemNoA collection item. read: leave out slug to read every item of the collection.
batchNoread or save several at once instead of page_slug / item / region: [{ page_slug | item | region, with title, description, texts or fields to save }]. Each is answered on its own; one that fails does not stop the rest.
textsNosave, page or region: { node_id: { prop: translated text } }, using the node_id and prop that read returned. A word left out keeps what it has; an empty string removes its translation.
titleNosave, page: the translated title.
actionYesstatus: the site's languages, what is still untranslated, and what is stale (its original changed since it was translated, so the original shows until it is translated again). add_language / remove_language: declare or drop one (removing deletes nothing a visitor sees until published; its words are kept unless the language is added back). read: the original words of one page, item or region, with any translation so far. save: store a translation.
fieldsNosave, item: { field: translated value }. Same shape as the field itself; a field left out keeps what it has; an empty string removes its translation.
localeNoLanguage code such as 'fr' or 'pt-br'. Its pages live at /fr/..., /pt-br/... Required except for status.
regionNoWords outside a page: 'header', 'footer', 'pageLayout', or 'collection:<content_type>' for the words of an item-page layout.
site_idYes
page_slugNoA page, e.g. '/' or '/about'.
descriptionNosave, page: the translated search description.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / batch
      Added value: +{
      +  "description": "read or save several at once instead of page_slug / item / region: [{ page_slug | item | region, with title, description, texts or fields to save }]. Each is answered on its own; one that fails does not stop the rest.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "description": {
      +        "type": "string"
      +      },
      +      "fields": {
      +        "additionalProperties": {},
      +        "type": "object"
      +      },
      +      "item": {
      +        "$ref": "#/properties/item"
      +      },
      +      "page_slug": {
      +        "type": "string"
      +      },
      +      "region": {
      +        "type": "string"
      +      },
      +      "texts": {
      +        "$ref": "#/properties/texts"
      +      },
      +      "title": {
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "maxItems": 50,
      +  "minItems": 1,
      +  "type": "array"
      +}
    • changedInput schema / properties / item / description
      Previous value: -"A collection item."New value: +"A collection item. read: leave out slug to read every item of the collection."
    • changedInput schema / properties / item / required
      Previous value: -[
      -  "content_type",
      -  "slug"
      -]New value: +[
      +  "content_type"
      +]
  2. Changed1 schema field changed
    • changedInput schema / properties / action / description
      Previous value: -"status: the site's languages and what is still untranslated. add_language / remove_language: declare or drop one (removing deletes nothing a visitor sees until published; its words are kept unless the language is added back). read: the original words of one page, item or region, with any translation so far. save: store a translation."New value: +"status: the site's languages, what is still untranslated, and what is stale (its original changed since it was translated, so the original shows until it is translated again). add_language / remove_language: declare or drop one (removing deletes nothing a visitor sees until published; its words are kept unless the language is added back). read: the original words of one page, item or region, with any translation so far. save: store a translation."
  3. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations declare destructiveHint=true and idempotentHint=true, and the description adds genuinely useful context beyond them: translations live in the draft and only go live on publish, removing a language hides nothing from visitors until published and keeps the words, and untranslated pages/items keep their original address. It never explains what is actually destructive (e.g. overwriting an existing translation when saving), which is the main remaining gap.

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?

Five short sentences with no filler, and the workflow and draft/publish constraint are front-loaded. The closing sentence about adding a language-switcher block to the header is arguably advisory rather than definitional, but it is short and relevant to completing the task.

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 an 11-parameter, nested, five-action tool with no output schema, the description covers the important design facts: order of operations, batching, shared structure across languages, URL behavior, and publish semantics. What is missing is modest — return-shape hints for 'read' and error handling within batch — and much of that is covered by the schema.

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 91%, so nearly every parameter already carries its own description, including the action enum, locale, region, texts and fields semantics. The description adds the batch concept ('many in one call') and the shared-structure rule, but otherwise restates the flow the schema already documents. Baseline 3 applies when the schema does the heavy lifting.

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 states the resource (a site's languages and translated content) and the verbs involved (add a language, read words, save a translation), and it is clearly distinct from siblings like update_page or publish. The opening line 'Show the site in other languages at /<code>/...' frames the outcome rather than the operation, so an agent has to read further to learn this is a multi-action translate tool.

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?

It gives an explicit workflow order: add a language, read a page/item/region's words, then save each translation, with a batch alternative for many at once. It does not state when to prefer this over editing original content or when not to use it, but the sequencing guidance is concrete enough to drive correct invocation.

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.

Resources