Skip to main content
Glama

Language.Detect Language

language.detect_language

Detects the dominant language in a provided text so you can route or process content correctly; note that each call incurs Cloud Translation API cost.

Instructions

Detect the dominant language of a text. Incurs Cloud Translation API cost.

Input Schema

NameRequiredDescriptionDefault
textYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

B3.1/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It does usefully disclose a cost implication ('Incurs Cloud Translation API cost'), which is a genuine behavioral trait an agent should weigh. However, it says nothing about input size limits, API enablement requirements, error behavior, or whether confidence scores are returned.

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?

Two short, front-loaded sentences with zero filler. The purpose comes first and the cost caveat second, which is the right priority order for an agent scanning definitions.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple, an output schema exists so return values need not be explained, and cost is disclosed. Still, for a call that bills the user, the description omits input constraints and cost-mitigation context (e.g., batching via language.batch_translate) that would complete the picture.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and the single parameter 'text' is never elaborated in the description. There is no mention of length limits, encoding, plain text vs. markup, or whether multiple languages are acceptable — all meaningful for a language detector.

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 ('Detect') and resource ('dominant language of a text'), which is clearly distinct from siblings like language.translate and language.analyze_sentiment. It does not explicitly name or contrast itself against those siblings, 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 Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this tool versus language.translate, language.analyze_sentiment, or language.analyze_entities, nor any stated preconditions. The agent must infer the choice entirely from the tool name.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools