Skip to main content
Glama
OrtaMarco

seo-geo-mcp-server

by OrtaMarco

Hreflang Check

hreflang_check
Read-onlyIdempotent

Validate hreflang annotations for BCP-47 code validity, self-referencing entries, x-default fallback, duplicate codes, and optional reciprocal linking to prevent Google from ignoring your hreflang.

Instructions

Validate a page's <link rel="alternate" hreflang> annotations: language/region code validity (BCP-47), the required self-referencing entry, the x-default fallback, and duplicate codes.

With check_reciprocity=true it fetches each alternate and confirms it links back to this page — non-reciprocal hreflang is silently ignored by Google, and it is impossible to detect from one page in isolation.

Args:

  • url (string): the page to check.

  • check_reciprocity (boolean): verify alternates link back (default false).

  • response_format ('markdown' | 'json'): output format (default 'markdown').

Returns: { declared_lang, entries[{hreflang, href, valid_code, is_self, reciprocates}], has_x_default, self_referencing, duplicate_codes[], invalid_codes[], findings[] }.

Example: "Is hreflang set up correctly on https://example.com/es/pagina?" -> hreflang_check(url="https://example.com/es/pagina", check_reciprocity=true).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesPage URL to analyse, e.g. 'https://example.com/blog/post'. The scheme defaults to https://.
response_formatNoOutput format: 'markdown' for a human-readable summary (default) or 'json' for the full structured payload.markdown
check_reciprocityNoFetch each alternate to confirm it links back. Catches the most common hreflang bug.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes
entriesYes
findingsYes
final_urlYes
declared_langYes
has_x_defaultYes
invalid_codesYes
duplicate_codesYes
self_referencingYes
reciprocity_checkedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.2.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. First observedv1.0.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already indicate read-only, idempotent, and non-destructive behavior. The description adds valuable behavioral context by disclosing that enabling check_reciprocity fetches each alternate and explaining that non-reciprocal hreflang is silently ignored by Google and undetectable from a single page. It stops short of mentioning timeouts or rate limits, but the behavioral disclosure is strong.

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?

The description is well organized: purpose first, then the advanced reciprocity behavior, followed by compact Args, the return shape, and a concrete example. Every section earns its place and there is no filler or redundancy.

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

Completeness5/5

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

With 100% schema coverage, relevant annotations, an output schema, and a description that explains the non-obvious reciprocity behavior and return payload, an agent has everything it needs to select and invoke the tool correctly. The example query further anchors intended usage.

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 the baseline is 3. The description repeats each parameter's name and default value but adds some useful context, especially for check_reciprocity ('catches the most common hreflang bug'). This is helpful but doesn't substantially go beyond what the schema already documents.

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 clearly identifies the resource (a page's `<link rel="alternate" hreflang>` annotations), the action (validate), and the specific validation checks: BCP-47 validity, self-referencing entry, x-default fallback, and duplicate codes. This is specific enough to distinguish it from sibling tools like sitemap_check or geo_audit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

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

The opening sentence explicitly states the tool's purpose, making it clear when an agent should use it. The check_reciprocity paragraph also tells the agent when to enable that option and why it matters. It doesn't explicitly name alternative tools or give when-not-to-use guidance, but the scope is unambiguous.

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