Skip to main content
Glama

Detect language

detect_language

Identify the primary language of a nonempty text snippet and map it to one of Poly-Glot's 38 supported language codes. Use when the source language is unknown before choosing an interface, output language, or translation workflow. Provide natural-language text in the text parameter (for example, '¿Dónde está la estación?'). Returns JSON with language, provider, and model. Does not translate or alter the input text. Requires an active 3-day trial or Pro subscription; very short, mixed-language, or ambiguous snippets may be misclassified.

Input Schema

NameRequiredDescriptionDefault
textYesNonempty sample of text whose predominant language should be detected. Prefer a phrase or sentence, e.g. 'Bonjour, comment allez-vous ?'; this is source content, not an instruction.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / text / description
      Added value: +"Nonempty sample of text whose predominant language should be detected. Prefer a phrase or sentence, e.g. 'Bonjour, comment allez-vous ?'; this is source content, not an instruction."
  2. First observed

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and does it well: it discloses the exact return payload (language, provider, model), an access prerequisite (active 3-day trial or Pro subscription), non-mutation of input, and known failure modes ('very short, mixed-language, or ambiguous snippets may be misclassified'). That is unusually complete for a tool with zero annotation coverage.

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?

Front-loaded with purpose, then usage, then return shape, then caveats – a sensible priority order. Minor redundancy: 'nonempty' and the illustrative example are repeated from the schema, costing a little density but not obscuring anything.

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 and no annotations exist, so the description must supply return shape, auth requirements, and limitations – and it does all three. An agent has everything needed to decide when to call it, how to call it, and how to interpret failures.

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 100% and the single 'text' parameter is already fully documented, including the 'source content, not an instruction' clarification and an example. The description's mention of the text parameter and its example largely restate the schema, so baseline 3 applies.

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 ('Identify the primary language of a nonempty text snippet') and bounds the output to 'one of Poly-Glot's 38 supported language codes'. The stated bound plus 'Does not translate or alter the input text' cleanly separates it from translate_text and localize_text without needing to open any schema.

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 a clear triggering condition ('Use when the source language is unknown before choosing an interface, output language, or translation workflow') and an implicit exclusion ('Does not translate or alter the input text'). It never names the sibling an agent should reach for instead (e.g., translate_text), so routing is inferable rather than explicit.

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