Skip to main content
Glama

Language Detection

language_detect
Read-only

Detect the language of a text (80+ languages) with ISO 639-1 and 639-3 codes, confidence, a reliability flag and the top candidates. Runs locally, nothing is stored. Params: text (required, up to 20,000 characters), top (number of candidates, default 3). Price: $0.0025 USDC per call, paid inside this MCP call via x402 (USDC on Base, Solana, Polygon or Arbitrum). x402 MCP clients such as @x402/mcp pay automatically. Free sample: call with the example input {"text":"Bonjour, je voudrais réserver une table pour deux personnes ce soir."}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topNo
textYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations declare readOnly/openWorld/non-destructive, and the description goes well beyond by disclosing local execution, no data storage, exact pricing ($0.0025 USDC per call), the x402 payment rails (Base, Solana, Polygon, Arbitrum), and that compatible MCP clients auto-pay. This is materially new behavioral information an agent needs.

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

Conciseness4/5

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

Output content and parameters are front-loaded, and the pricing/example sentences are dense with operational facts rather than filler. The description is long, but nearly every clause earns its place (payment rails is slightly verbose).

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?

No output schema exists, yet the description enumerates the returned fields, and it covers input limits, behavioral constraints, and payment mechanics. Nothing an agent needs to call and interpret this tool correctly is missing.

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?

Schema description coverage is 0%, so the description carries the load: it explains 'text' is required and caps at 20,000 characters, and 'top' means number of candidates with a default of 3. It omits the schema's min/max bounds (1-10) on top, hence not a 5.

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 language of a text') and enumerates the exact return content (ISO 639-1/639-3 codes, confidence, reliability flag, top candidates). An agent can distinguish this from translate or text_classify without opening either schema, even though no sibling is named.

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?

Provides clear operational context ('runs locally, nothing is stored') and invokes payment guidance plus a concrete example invocation, but never states when to choose this over siblings like translate or text_classify. Usage is implied rather than routed.

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