Skip to main content
Glama

Libretranslate Detect Language

libretranslate_detect_language
Read-onlyIdempotent

Detect the source language of a piece of text. Returns ranked language candidates with confidence.

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": "Bonjour, comment allez-vous?"
    },
    "name": "libretranslate_detect_language"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesText to analyze

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedOutput schema / oneOf
      Added value: +[
      +  {
      +    "properties": {
      +      "candidates": {
      +        "description": "Ranked language candidates with confidence scores",
      +        "items": {
      +          "properties": {
      +            "confidence": {
      +              "description": "Confidence score for this language",
      +              "type": [
      +                "number",
      +                "null"
      +              ]
      +            },
      +            "language": {
      +              "description": "Detected language code",
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "found": {
      +        "description": "Present and true on an answer; a miss is the found:false branch.",
      +        "enum": [
      +          true
      +        ],
      +        "type": "boolean"
      +      },
      +      "text": {
      +        "description": "Text that was analyzed",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "text",
      +      "candidates"
      +    ],
      +    "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: -{
      -  "candidates": {
      -    "description": "Ranked language candidates with confidence scores",
      -    "items": {
      -      "properties": {
      -        "confidence": {
      -          "description": "Confidence score for this language",
      -          "type": [
      -            "number",
      -            "null"
      -          ]
      -        },
      -        "language": {
      -          "description": "Detected language code",
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  "text": {
      -    "description": "Text that was analyzed",
      -    "type": "string"
      -  }
      -}
    • removedOutput schema / required
      Removed value: -[
      -  "text",
      -  "candidates"
      -]
  2. Added

TDQS

A3.6/5.0
Behavior3/5

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

The annotations already declare the operation as read-only, idempotent, open-world, and non-destructive. The description adds that results are ranked candidates with confidence scores, which is useful behavioral context, but it does not discuss ambiguity handling, limits, or other operational traits beyond what the output schema and annotations cover.

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?

The description is two short sentences, front-loaded with the core action and followed immediately by the return behavior. Every sentence earns its place with no redundant wording.

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?

This is a simple one-parameter tool with full schema coverage, rich annotations, and an output schema. The description supplies the essential return semantics (ranked candidates with confidence) and is complete enough for an agent to call it correctly, with only minor gaps around usage guidance.

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 single text parameter is fully documented structurally. The description only restates that the input is a piece of text and adds no guidance on format, length, encoding, or ambiguous inputs. With the schema doing the parameter work, baseline 3 is appropriate.

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 gives a clear verb and resource: 'Detect the source language of a piece of text.' That is specific enough for an agent to know the function immediately. It does not explicitly distinguish itself from translation siblings, but the detection purpose is unambiguous.

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?

Usage is implied by the stated purpose, but the description offers no explicit when-to-use rules, exclusions, or comparison with alternatives such as translation. For a simple detection tool the implication is adequate, though it leaves routing to inference.

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.