Skip to main content
Glama

Language detect language

language.detect_language
Read-onlyIdempotent

Detects the dominant language of a text to support routing and localization decisions; each request incurs Cloud Translation API cost.

Instructions

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

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": "language.detect_language"
  }
}

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?

Annotations already declare readOnlyHint, idempotentHint, openWorldHint and destructiveHint=false, so the safety profile is covered without the description. The description's genuine addition is the billing disclosure ('Incurs Cloud Translation API cost'), which lets an agent reason about call volume — a real behavioral fact not present in annotations. It stops short of anything else, such as whether the result is cached or how ambiguous inputs are resolved.

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 sentences with zero waste: the capability comes first and the cost caveat second. Nothing is padded or repeated from the title.

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 annotations cover safety — so the description is close to sufficient. However, with a completely undocumented input parameter it should say at least a sentence about the text input, and 'dominant language' would benefit from one clarifying clause about mixed-language content.

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 required 'text' parameter has no description, so the description carries the full burden of explaining it. 'of a text' merely restates the parameter name; nothing is said about expected length, encoding, whether markup is tolerated, or how multiple languages in one string are handled.

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 ('the dominant language of a text'), and the qualifier 'dominant' usefully signals that a single winning language is returned even for mixed-language input. It does not explicitly distinguish itself from siblings such as language.translate or language.analyze_sentiment, so an agent must infer the boundary from names alone.

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 when-to-use guidance, no mention of alternatives (translate, analyze_sentiment, analyze_entities), and no prerequisite or input-condition advice. The only guidance offered is the cost warning, which informs the decision economically but not functionally.

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