Skip to main content
Glama

Detect language: which language a text is

language_detect
Read-only

Detect language of a text: the language as an ISO 639-1 and 639-3 code with its English name, from 82 languages (franc), offline and fast. Use to route a message to the right translator, model or support team, or to tag content by language. Example: text=Det här är en mening skriven på svenska om väder och resor.. Price $0.01/call via x402 USDC or a card key (/credits), first 25 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

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

Input Schema

NameRequiredDescriptionDefault
textYesThe text (up to 10,000 characters)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already cover read-only/destructive/open-world/idempotent hints, and the description still adds material context: the underlying detector, that it runs offline, that each call costs $0.01 via x402 USDC or a card key, 25 free calls, failed calls free, and that repeats are not free — which explains why idempotentHint is false. This is genuine value beyond the structured fields.

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?

Front-loaded with the core capability and return format, then use cases, then cost/behavior. It is dense but every clause carries information; the only blemish is the stray double period after the example.

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 one-parameter, no-output-schema tool, the definition covers input shape, return values (code pair plus English name), coverage limits, cost model, and side-effect profile. Nothing an agent needs to call and interpret it correctly is missing.

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?

Single parameter at 100% schema coverage, so the schema already documents `text` including the 10,000-character cap; baseline 3 applies. The worked example (a Swedish sentence) adds a little practical flavor about expected input but no format rules the schema lacks.

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?

Specific verb+resource ("Detect language of a text") plus the exact return shape (ISO 639-1 and 639-3 codes with English name), the language inventory (82, franc), and the operational profile (offline, fast). It does not differentiate itself from the sibling `text_language`, which an agent may find hard to choose between.

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?

Gives concrete downstream uses (routing to translator/model/support team, tagging content), which is real when-to-use guidance. It offers no when-not conditions and does not name an alternative for overlapping cases such as the sibling `text_language`.

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