Skip to main content
Glama

ai_detect_language_batch

Read-only

AI language detection (batch) — Identify the language of up to 30 texts in one call (name, ISO 639-1 code, confidence) via Workers AI, cross-checked offline against each text's writing script. texts = items separated by | or newlines, or a JSON array. Returns per-item results plus the language mix and dominant language. Price: $0.008 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": {
      "texts": "<texts>"
    },
    "name": "ai_detect_language_batch"
  }
}

Input Schema

NameRequiredDescriptionDefault
textsYese.g. Bonjour tout le monde|Hola, como estas|Guten Morgen

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already cover the read-only, non-destructive, open-world profile, so the description earns credit for adding what they don't: the $0.008 USDC charge on Base via x402 (a payment precondition an agent must know), and the offline cross-check against each text's writing script. Return composition is also previewed (per-item results, language mix, dominant language).

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?

Two dense sentences with no filler; the core capability and limit are front-loaded, with the input format and price following. Slightly packed, but every clause carries information an agent needs.

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 tool with no output schema, the description covers the cap, the input encoding, the return shape, the detection method, and the cost. Nothing an agent needs to call it 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 coverage is 100% and the single 'texts' parameter only carries an example, so the description goes beyond it by specifying accepted delimiters: pipe-separated, newline-separated, or a JSON array. That resolves real ambiguity about how to pack 30 items into one string.

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 ('Identify the language of up to 30 texts in one call') plus the output fields (name, ISO 639-1 code, confidence) and the underlying engine. The 'batch' framing and 'up to 30 texts in one call' implicitly separate it from the single-text sibling ai_detect_language, but no sibling is named outright.

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?

The batch context and the 30-item ceiling imply when to reach for this over a single-text call, but there is no explicit when-to-use/when-not statement or named alternative. An agent must infer the routing from the word 'batch' in the title.

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