Skip to main content
Glama

IA-QA — 152 QA & Dev Tools for AI Agents

detect_language

Read-onlyIdempotent

Detect the natural language of a text using n-gram frequency analysis and common word markers. Supports 15 languages: English, French, Spanish, German, Italian, Portuguese, Dutch, Russian, Chinese, Japanese, Korean, Arabic, Polish, Turkish, Swedish.

Input Schema

NameRequiredDescriptionDefault
inputYesText to detect language from (min 20 chars for accuracy)

Output Schema

NameRequiredDescriptionDefault
langNo
nameNo
scoreNo
methodNo
matchedNo
languageNo
confidenceNo
top_candidatesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "input": "Il rilascio è fallito perché la migrazione del database è scaduta dopo dieci minuti."
      +  }
      +]
  2. Changed1 schema field changed
    • addedOutput schema / properties
      Added value: +{
      +  "confidence": {
      +    "type": "number"
      +  },
      +  "lang": {},
      +  "language": {
      +    "type": "string"
      +  },
      +  "matched": {},
      +  "method": {
      +    "type": "string"
      +  },
      +  "name": {
      +    "type": "string"
      +  },
      +  "score": {},
      +  "top_candidates": {
      +    "type": "array"
      +  }
      +}
  3. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "type": "object"
      +}
  4. First observed

TDQS

A4.1/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, so the safety profile is covered. The description adds useful behavioral context: the detection method and the exact set of 15 supported languages, which helps an agent understand capability boundaries. It does not discuss confidence or failure behavior, but that is a minor gap given 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.

Conciseness5/5

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

Two tight sentences with no wasted language. The core purpose and method come first, followed by the supported-language list, which is a useful scoping detail front-loaded after the main action.

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?

An output schema exists, so return values need not be explained in the description. The description covers the method, supported languages, and purpose, while annotations and schema cover safety and parameter constraints. An agent has enough to select and call the tool correctly.

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?

There is only one parameter, and the schema description coverage is 100%; the schema already explains that 'input' must be text and recommends at least 20 characters. The description adds no parameter-level details beyond what the schema provides, so the baseline 3 is appropriate.

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?

States a specific verb and resource ('Detect the natural language of a text') and adds the method (n-gram frequency analysis and common word markers). It also enumerates the supported language set, which clearly distinguishes it from generic text tools like text_stats or word_frequency.

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 description implies the tool is for language identification and lists supported languages, but it does not explicitly say when to use this versus alternatives such as analyzing readability or word frequency. No exclusions or preconditions are given beyond what the schema already states.

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.