Skip to main content
Glama

Detect language

text_detect_language
Read-onlyIdempotent

Identify whether text is Arabic, English, mixed or unknown from its script mix, with a confidence score and the count of Arabic, Latin and other letters. Deterministic and model-free, so it is cheap enough to run on every incoming message to route Arabic work.

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": "text_detect_language"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesThe text to identify.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world. The description adds genuinely new behavioral context beyond that: it is deterministic and model-free, so results are stable and cheap — exactly what an agent needs to decide whether to call it per message.

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 dense sentence that front-loads the outcome categories, then adds the mechanism and the usage recommendation. No filler or restatement of the name.

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?

With no output schema, the description usefully sketches the return values (confidence score, counts of Arabic/Latin/other letters) for a one-parameter tool. It does not specify thresholds for 'mixed' versus 'unknown' or the exact response shape, leaving a small gap for an agent interpreting results.

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?

Only one parameter, and the schema already documents it at 100% coverage, so the baseline is high. The description adds meaning by clarifying that the text is analyzed via script mix and that the call yields a confidence score plus per-script letter counts.

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 names a specific verb (identify), the resource (language of text), and the exact output categories (Arabic, English, mixed, unknown) derived from script mix. It is unmistakably distinct from siblings like text_metrics or audio_transcribe, which handle other kinds of text analysis.

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?

"Cheap enough to run on every incoming message to route Arabic work" gives a concrete usage context and an implied trigger (per-message routing). It stops short of naming when not to use it or pointing at a sibling for alternative needs, so it is clear but not exhaustive.

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.