Skip to main content
Glama

Translate Text

translate
Read-onlyIdempotent

Translate up to 200 text segments in a single call - the same result that would otherwise take 200 separate calls to translate a whole file. Markdown, HTML and {x} placeholders preserved per segment, order and count kept intact, source language auto-detected, automatic fallback across multiple models for uptime, providers that train on submitted prompts excluded. A single string also works. No account, no API key. Try GET /translate/sample.

Input Schema

NameRequiredDescriptionDefault
textYesText to translate - a single string, or an array of up to 200 segments to translate together in one call (batch/bulk translation), preserving order and count.
source_langNoSource language code. Omit to auto-detect.
target_langYesTarget language as an ISO 639-1 code, e.g. 'en', 'fr', 'ja'.
preserve_formatNoKeep markdown syntax, HTML tags and {x}/{{x}} placeholders unchanged, translating only the surrounding natural-language text - useful for localizing UI strings or templated content.

Output Schema

NameRequiredDescriptionDefault
textNoThe original input text or segments.
target_langYes
model_servedNoNeutral model tag for this call (also present on x402_receipt.model_served).
x402_receiptNoBilling and provenance receipt, including segments_processed for batch calls.
translated_textYesTranslated text - a string, or an array aligned with the input segments for batch requests.
detected_source_langNoAuto-detected source language, when not supplied.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / model_served
      Added value: +{
      +  "description": "Neutral model tag for this call (also present on x402_receipt.model_served)."
      +}
  2. Changed5 schema fields changed
    • addedInput schema / properties / preserve_format / description
      Added value: +"Keep markdown syntax, HTML tags and {x}/{{x}} placeholders unchanged, translating only the surrounding natural-language text - useful for localizing UI strings or templated content."
    • addedInput schema / properties / source_lang / description
      Added value: +"Source language code. Omit to auto-detect."
    • addedInput schema / properties / target_lang / description
      Added value: +"Target language as an ISO 639-1 code, e.g. 'en', 'fr', 'ja'."
    • addedInput schema / properties / text / description
      Added value: +"Text to translate - a single string, or an array of up to 200 segments to translate together in one call (batch/bulk translation), preserving order and count."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "detected_source_lang": {
      +      "description": "Auto-detected source language, when not supplied."
      +    },
      +    "target_lang": {
      +      "type": "string"
      +    },
      +    "text": {
      +      "description": "The original input text or segments."
      +    },
      +    "translated_text": {
      +      "description": "Translated text - a string, or an array aligned with the input segments for batch requests."
      +    },
      +    "x402_receipt": {
      +      "description": "Billing and provenance receipt, including segments_processed for batch calls.",
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "target_lang",
      +    "translated_text"
      +  ],
      +  "type": "object"
      +}
  3. First observed

TDQS

A3.9/5.0
Behavior5/5

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

Annotations only cover read-only/idempotent/safety; the description adds substantive behavior: a hard 200-segment limit, order/count preservation, format-preserving translation, multi-model fallback for uptime, prompt-training exclusion, and no account or API key required. These are real operational traits an agent cannot get from the annotations.

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 main value proposition (batch of 200 in one call) is front-loaded, followed by an efficient comma-separated list of guarantees and a sample-endpoint pointer. The long enumerative sentence is dense but each clause carries signal.

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?

With an output schema present, return values need no explanation, and annotations plus full schema coverage leave little else to specify. The description still supplies the practical limits, privacy and auth context an agent needs to call it correctly, though it omits error/partial-failure behavior for batches.

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%, so the schema already documents all four parameters including the anyOf string-vs-array shape and the preserve_format semantics. The description restates 'A single string also works' and preservation behavior, adding little beyond the schema, so baseline 3 applies.

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?

States a specific verb (translate) and resource (up to 200 text segments) and makes the batch capability explicit, which separates it from single-string translation. It never names a sibling such as detect_language, so the differentiation is implied rather than stated.

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?

The 'whole file in one call' framing implies when batching is worthwhile, and 'A single string also works' covers the degenerate case, but there is no explicit when-not guidance or pointer to an alternative tool. Usage is inferable rather than instructed.

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.