Skip to main content
Glama

ai_detect_language

Read-only

AI language detection — Detect the language of text (name + ISO 639-1 code) via Workers AI. Price: $0.004 USDC (Base, via x402).

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

Input Schema

NameRequiredDescriptionDefault
textYestext to identify

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=true, so the safety profile is covered. The description adds genuinely useful context beyond that: the backend (Workers AI), the exact return fields, and a required $0.004 USDC payment on Base via x402, which is an auth/cost constraint an agent must know. It says nothing about error behavior, minimum text length, or handling of ambiguous/mixed-language input.

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?

A single tight sentence pair with the purpose front-loaded and the cost appended compactly. The parenthetical output spec is dense but earns its place; nothing is redundant.

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, non-destructive read with annotations and no output schema, the description supplies the return shape and the payment requirement, which is most of what an agent needs. Minor gaps remain around failure modes and input constraints.

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?

With one parameter and 100% schema description coverage, the schema already documents `text` fully, so the baseline is 3. The description adds no syntax, length, or encoding guidance for the input beyond what the schema provides; its only extra information concerns the output and price.

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?

States a specific verb and resource ("Detect the language of text") and even names the return shape (language name + ISO 639-1 code), which makes the intent unambiguous against verb-distinct siblings such as ai_translate or ai_classify. It does not explicitly contrast itself with any sibling, so it stops short of a 5.

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 only implied by the purpose statement — an agent infers it should call this when it needs the language identifier of a string. There is no explicit when-to-use, no when-not-to-use, and no guidance on prerequisites (e.g., payment setup) beyond the price tag.

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