Skip to main content
Glama

Libretranslate Translate

libretranslate_translate
Read-onlyIdempotent

Translate text. Source can be "auto" to auto-detect. Returns translated text and the detected source (if applicable).

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "text": "Hello, how are you?",
      "target": "es"
    },
    "name": "libretranslate_translate"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesText to translate
formatNotext (default) | html
sourceNoSource language code or "auto" (default "auto")
targetYesTarget language code (e.g., "es", "fr", "ja")

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedOutput schema / oneOf
      Added value: +[
      +  {
      +    "properties": {
      +      "detected_confidence": {
      +        "description": "Confidence score for detected language or null",
      +        "type": [
      +          "number",
      +          "null"
      +        ]
      +      },
      +      "detected_source": {
      +        "description": "Auto-detected source language code or null",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "format": {
      +        "description": "Format type (text or html)",
      +        "type": "string"
      +      },
      +      "found": {
      +        "description": "Present and true on an answer; a miss is the found:false branch.",
      +        "enum": [
      +          true
      +        ],
      +        "type": "boolean"
      +      },
      +      "source": {
      +        "description": "Source language code or 'auto'",
      +        "type": "string"
      +      },
      +      "target": {
      +        "description": "Target language code",
      +        "type": "string"
      +      },
      +      "text": {
      +        "description": "Original text that was translated",
      +        "type": "string"
      +      },
      +      "translated_text": {
      +        "description": "Translated text or null if unavailable",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      }
      +    },
      +    "required": [
      +      "text",
      +      "source",
      +      "target",
      +      "format",
      +      "translated_text",
      +      "detected_source",
      +      "detected_confidence"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "description": "A miss or an unavailable upstream: found:false with a reason and a hint (the shape check-found-false-schemas.mjs expects).",
      +    "properties": {
      +      "found": {
      +        "enum": [
      +          false
      +        ],
      +        "type": "boolean"
      +      }
      +    },
      +    "required": [
      +      "found"
      +    ],
      +    "type": "object"
      +  }
      +]
    • removedOutput schema / properties
      Removed value: -{
      -  "detected_confidence": {
      -    "description": "Confidence score for detected language or null",
      -    "type": [
      -      "number",
      -      "null"
      -    ]
      -  },
      -  "detected_source": {
      -    "description": "Auto-detected source language code or null",
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "format": {
      -    "description": "Format type (text or html)",
      -    "type": "string"
      -  },
      -  "source": {
      -    "description": "Source language code or 'auto'",
      -    "type": "string"
      -  },
      -  "target": {
      -    "description": "Target language code",
      -    "type": "string"
      -  },
      -  "text": {
      -    "description": "Original text that was translated",
      -    "type": "string"
      -  },
      -  "translated_text": {
      -    "description": "Translated text or null if unavailable",
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  }
      -}
    • removedOutput schema / required
      Removed value: -[
      -  "text",
      -  "source",
      -  "target",
      -  "format",
      -  "translated_text",
      -  "detected_source",
      -  "detected_confidence"
      -]
  2. Added

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive and open-world, so the safety profile is covered. The description adds that the detected source is returned when applicable, which is mildly useful behavioral context, but says nothing about rate limits, input size, or error behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, front-loaded with the action, and zero filler. Nothing could be removed without losing information.

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?

An output schema exists, so the description needn't detail return values, and parameters are fully covered by the schema. What remains missing for a small, single-purpose tool is only sibling routing and any input constraints, which is a modest gap.

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 all four parameters (text, format, source, target) are already documented, including the 'auto' default for source. The description's mention of 'auto' merely repeats that. 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 and resource ('Translate text') and hints at the scope of the tool with the auto-detect note. It doesn't distinguish itself from the sibling libretranslate_detect_language, so the boundary with a language-detection tool is left implicit.

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

Usage Guidelines2/5

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

No statement of when to use this versus libretranslate_detect_language or the language-listing sibling, and no exclusions or prerequisites. The only 'guidance' is the parameter-level note that source may be 'auto', which is already in the schema.

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.