Skip to main content
Glama

Detect Language

detect_language
Read-onlyIdempotent

Detect the language of a text string. Returns an array of detected languages with confidence scores.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesThe text whose language should be detected

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesThe input text that was analyzed
detectionsYesArray of detected languages with confidence scores

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "text": "Hola, ¿cómo estás?"
      +  },
      +  {
      +    "text": "The quick brown fox jumps over the lazy dog"
      +  }
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "detections": {
      +      "description": "Array of detected languages with confidence scores",
      +      "items": {
      +        "properties": {
      +          "confidence": {
      +            "description": "Confidence score for the detection",
      +            "type": "number"
      +          },
      +          "language": {
      +            "description": "Detected language code",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "language",
      +          "confidence"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "text": {
      +      "description": "The input text that was analyzed",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "text",
      +    "detections"
      +  ],
      +  "type": "object"
      +}
  2. Changed2 schema fields changed
    • removedInput schema / examples
      Removed value: -[
      -  {
      -    "text": "Hola, ¿cómo estás?"
      -  },
      -  {
      -    "text": "The quick brown fox jumps over the lazy dog"
      -  }
      -]
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "detections": {
      -      "description": "Array of detected languages with confidence scores",
      -      "items": {
      -        "properties": {
      -          "confidence": {
      -            "description": "Confidence score for the detection",
      -            "type": "number"
      -          },
      -          "language": {
      -            "description": "Detected language code",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "language",
      -          "confidence"
      -        ],
      -        "type": "object"
      -      },
      -      "type": "array"
      -    },
      -    "text": {
      -      "description": "The input text that was analyzed",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "text",
      -    "detections"
      -  ],
      -  "type": "object"
      -}New value: +null
  3. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "detections": {
      +      "description": "Array of detected languages with confidence scores",
      +      "items": {
      +        "properties": {
      +          "confidence": {
      +            "description": "Confidence score for the detection",
      +            "type": "number"
      +          },
      +          "language": {
      +            "description": "Detected language code",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "language",
      +          "confidence"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "text": {
      +      "description": "The input text that was analyzed",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "text",
      +    "detections"
      +  ],
      +  "type": "object"
      +}
  4. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "text": "Hola, ¿cómo estás?"
      +  },
      +  {
      +    "text": "The quick brown fox jumps over the lazy dog"
      +  }
      +]
  5. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint false. The description adds the return format (array with confidence scores), which is useful behavioral detail beyond the annotations. No contradictions.

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?

Two sentences, front-loaded with the core action, no unnecessary words. Excellent conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple one-parameter tool with an output schema and strong annotations, the description provides the essential behavior and return information. Nothing more is needed.

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 100% with the 'text' parameter described as 'The text whose language should be detected'. The description only repeats this, adding no additional semantic detail, so the baseline 3 applies.

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?

The description uses a specific verb ('Detect') and resource ('language of a text string'), clearly distinguishing it from siblings like translate and list_languages. The scope is unambiguous and matches the tool name.

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?

The context of use is clear: when you have a text and need to identify its language. However, it does not explicitly mention alternatives or exclusions, so it falls short of a 5.

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.