Skip to main content
Glama
Akxan
by Akxan

hreflang / multilingual consistency check

hreflang_check
Read-onlyIdempotent

Verify hreflang annotations across HTML, HTTP headers, and XML sitemaps, checking reciprocal links, language codes, x-default, and canonical consistency.

Instructions

For a page (or a sitemap sample), read its hreflang alternates from all three places the spec allows - HTML , the HTTP Link: header, and xhtml:link entries in the XML sitemap (used by several WordPress multilingual plugins) - and verify: every alternate URL is reachable, points back (reciprocal) to the source, has a self-referencing entry, uses valid language-region codes, has an x-default, and that canonicals do not contradict the alternates. Also compares with the declared hreflang and says which source each annotation came from.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlsNo
sampleSizeNo
sitemapUrlNoSitemap to sample pages from when urls[] is omitted; it is always also read for xhtml:link hreflang annotations.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.10.0
    • changedInput schema / properties / sitemapUrl / description
      Previous value: -"Sample pages from a sitemap instead."New value: +"Sitemap to sample pages from when urls[] is omitted; it is always also read for xhtml:link hreflang annotations."
  2. Changed1 schema field changedv0.5.1
    • removedInput schema / additionalProperties
      Removed value: -false
  3. First observedv0.3.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, openWorldHint, idempotentHint, and destructiveHint=false, covering the non-mutating nature. The description adds valuable behavioral context: it fetches pages/headers/sitemaps, checks reachability of alternate URLs, and reports the source of each annotation. This goes beyond annotations and helps an agent understand side effects (network requests) and output behavior.

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?

The description is a single dense paragraph that front-loads the core action ('read its hreflang alternates from all three places') and then lists verification points. Each clause adds substantive information; there is no fluff. It's long but justified given the tool's complexity, and the structure is logical (action, sources, checks, output note).

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?

Given the tool's complexity and the absence of an output schema, the description covers the main behaviors: sources read, all checks performed (reciprocity, self-referencing, language codes, x-default, canonical contradictions), and output hints (says which source each annotation came from). It doesn't detail the return format or error handling, but an agent can infer what the tool does and when to use it. It's reasonably complete for the task.

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 coverage is only 33% (only sitemapUrl has a description). The tool description partially compensates by explaining that urls is the list of pages to check and sitemapUrl is used both for sampling and for reading xhtml:link entries. However, sampleSize is not explained in either the schema or the description, leaving ambiguity about how it interacts with urls. The description adds some meaning but doesn't fully cover the parameter semantics.

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?

The description clearly states the tool reads hreflang alternates from three sources and verifies multiple consistency aspects. It uses specific verbs like 'read' and 'verify' with a clear resource (hreflang/multilingual consistency). It doesn't explicitly differentiate from sibling tools like sitemap_check or canonical_host_check, but the purpose is unambiguous and the scope is well-defined.

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 description implies usage contexts (checking multilingual pages or sitemap samples) but doesn't explicitly state when to use this tool over alternatives. It mentions reading from a sitemap, which overlaps with sitemap_check, but no guidance on selection criteria or when not to use it. The intent is inferable but not spelled out.

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