Skip to main content
Glama

Detect a web page's language

language
Read-only

Detect a web page's language: html lang attribute, Content-Language header, og:locale, hreflang alternates (other language versions) and a guess from the visible text. Fast (1-3 s). Free: 20 calls/day per user across free tools, no payment needed. Above that: $0.001 per call (x402, USDC on Base).

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": {
      "url": "<url>"
    },
    "name": "language"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesPublic http(s) URL
paymentNox402 payment: the base64 PAYMENT-SIGNATURE value signed for the requirements returned by an unpaid call (USDC on Base, gasless). Omit on the first call to get the price and requirements.

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 only declare readOnlyHint and openWorldHint; the description adds the things annotations never cover: latency (1-3 s), a free quota of 20 calls/day across free tools, and the paid fallback at $0.001/call via x402 in USDC on Base. It does not state what happens on an unreachable page or whether detection failures produce a partial result, so it stops short of full disclosure.

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?

It is one dense but front-loaded sentence that names the resource first, then the detection signals, then cost and speed. Nothing is redundant, though cramming the pricing tiers into the same breath slightly dilutes the core purpose statement.

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?

With no output schema, the description does the work of telling the agent that five distinct signals are consulted and that alternates represent other language versions, which implies a multi-field result. What is missing is the return shape itself (primary language plus evidence?) and error behavior, but for a two-parameter read tool this is nearly sufficient.

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%, so both the url and payment parameters are already fully documented, including the 'omit on first call' mechanic. The description only echoes the pricing side of the payment parameter and adds nothing about URL constraints; per the rubric this is the baseline 3 when the schema does the heavy lifting.

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?

The description names a specific verb and resource ("Detect a web page's language") and then enumerates the exact signals it inspects: html lang attribute, Content-Language header, og:locale, hreflang alternates, and a visible-text guess. That is far more specific than the title restated, and no sibling in the list covers language detection, so an agent can route to it confidently.

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 implied by the input (give a public URL, get its language), and the cost/latency notes help budgeting, but there is no explicit when-to-use/when-not-to-use guidance and no alternative named. The agent must infer that this is the right tool when language matters and that header/meta siblings would not answer the question.

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.