Skip to main content
Glama

Lookup Kit

detect_language

Read-only

Language detection, detect what language a text is in. Detect which language a text is written in (about 80 major languages), with the ISO 639-3 code, the language name and the top alternatives. Works offline; best with a sentence or more. Price: $0.002 per call (x402, USDC on Base).

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
textYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior5/5

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

Beyond the readOnlyHint/openWorldHint annotations, the description discloses material behavior an agent cannot infer: the tool runs offline (no network dependency), it has a hard cost of $0.002 per call, and payment is via x402/USDC on Base. It also states the practical input-size sweet spot. This is exactly the kind of cost and execution-model context that structured fields do not carry.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

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

The body of the description is dense and front-loads cost and output shape, but the first two sentences are near-duplicates ('Language detection, detect what language a text is in' / 'Detect which language a text is written in'), spending roughly a third of the text on no new information.

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 single-parameter classification tool with no output schema, the description is nearly self-sufficient: it explains what comes back, what the tool costs, how it runs, and how long the input should be. The only omission is the 8000-character input ceiling, which matters for agents passing long documents.

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 0%, so the description carries the burden for the single 'text' parameter. It does add meaning ('best with a sentence or more'), but it never mentions the enforced minLength of 3 or maxLength of 8000 characters, which an agent could easily violate on long documents.

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 names a specific operation and resource (detect the language of a text) and even specifies the output shape: ISO 639-3 code, language name, top alternatives. It also bounds coverage at about 80 major languages. It loses a point only because the opening clause restates the same idea three times rather than using that space to distinguish anything further.

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?

'Works offline; best with a sentence or more' gives real input-quality guidance, implying short fragments like single words produce weaker results. However, there is no explicit when-to-use/when-not statement and no named alternative or fallback, so the guidance is implied rather than stated.

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