Skip to main content
Glama
google-seo-mcp
by Akxan

hreflang / multilingual consistency check

hreflang_check
Read-onlyIdempotent

Validates hreflang annotations from HTML, HTTP headers, and XML sitemaps, checking reachability, reciprocity, self-reference, language-region codes, x-default, and canonical conflicts.

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.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "hreflang_check"
  }
}

Input 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.14.0
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
  2. 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."
  3. Changed1 schema field changedv0.5.1
    • removedInput schema / additionalProperties
      Removed value: -false
  4. First observedv0.3.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and open-world, so the safety profile is covered. The description adds meaningful behavior beyond that: it performs live reachability checks (network fetches), reads three distinct annotation sources, and reports provenance per annotation. It does not mention timeouts, rate limits, or how failures are surfaced, which keeps it below a 5.

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 purpose and the source list are front-loaded, and each subsequent clause adds a distinct check rather than repeating the name or title. It is a single dense run-on sentence, which makes the check list harder to scan than a short bulleted or semicolon-split structure would be.

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?

With no output schema, the description must imply return shape, and it only hints that results include source provenance per annotation. It also leaves ambiguous what happens when both urls[] and sitemapUrl are omitted, given zero required parameters. Adequate for a checker of this complexity, but not fully self-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?

Only sitemapUrl is documented in the schema (33% coverage); urls[] and sampleSize carry no schema descriptions. The description partially compensates by framing the two modes ('a page' vs 'a sitemap sample'), which maps roughly to urls[] versus sitemapUrl/sampleSize, but it never explains precedence between urls[] and sitemapUrl or what sampling does.

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 (verify) and resource (hreflang alternates) and enumerates exactly what is checked: reachability, reciprocity, self-reference, valid language-region codes, x-default, and canonical conflicts. It also states the three discovery sources (HTML link, HTTP Link header, sitemap xhtml:link), which clearly separates it from sibling checks like sitemap_check or canonical_host_check.

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 opening clause 'For a page (or a sitemap sample)' implies the two input modes, so an agent can infer when the tool applies. However, there is no explicit when-to-use/when-not guidance and no named alternative among the sibling checks, so routing decisions are left partly to inference.

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