Skip to main content
Glama

Detect the language of a text

detect_language
Read-onlyIdempotent

Detect the language of a text (25+ languages via script detection and stopword profiles) with ISO 639-1 code, name and confidence.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "text": "<text>"
    },
    "name": "detect_language"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesText (a sentence or more works best)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint, idempotentHint, closed-world), and the description adds real value on top: the detection method, the 25+ language ceiling, and the exact return shape (ISO 639-1 code, name, confidence). It does not say what happens for unsupported languages or low-confidence/ambiguous text, which is the remaining behavioral gap.

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?

A single front-loaded sentence with the core action first and the qualifiers in a compact parenthetical; every clause carries information (coverage, method, return fields). No filler or restatement of the title.

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?

For a one-parameter, annotation-covered tool with no output schema, the description supplies the return structure and the language-coverage limit, which is what an agent needs to interpret results. It stops short of describing behavior on unsupported languages or confidence thresholds, a small but real omission.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There is only one parameter and schema description coverage is 100%, so the baseline is 4 per the rubric. The description adds nothing about the text parameter beyond the schema, but nothing is required.

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+resource ("Detect the language of a text") and immediately qualifies scope with the mechanism and coverage ("25+ languages via script detection and stopword profiles"). It is unmistakable against the sibling utilities (text_diff, text_stats, hash_encode, etc.), none of which do language identification.

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 tool's obviously narrow scope, but the description offers no explicit when-to-use/when-not-to-use guidance and no caveat about short or ambiguous inputs (the schema note "a sentence or more works best" is the only hint). No alternatives exist among the siblings, so the gap is mild rather than misleading.

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.

Resources