Skip to main content
Glama

validate_hreflang

Read-onlyIdempotent

Check a page's hreflang tags for international SEO, including ISO 639-1 codes, x-default, self-references, duplicates, and optional return-link verification.

Instructions

Validate hreflang link elements on a page for international SEO. Checks language code format (ISO 639-1), x-default presence, self-referencing tags, duplicate codes, and optionally verifies that target pages link back (return link validation).

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": "validate_hreflang"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesThe fully-qualified URL to validate hreflang tags for.
maxReturnChecksNoMaximum number of return link checks to perform. Defaults to 10.
checkReturnLinksNoWhen true, fetch each hreflang target and verify it links back. Slower but catches missing bidirectional links.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.1

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint, so the safety profile is covered; the description adds real behavioral context by disclosing that return-link validation fetches each hreflang target, making the call slower but catching missing bidirectional links. It does not mention rate limits, failure handling, or what happens when target pages are unreachable.

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?

Two sentences, front-loaded with the purpose followed by the checklist of validations; nothing is redundant or padded. Slightly list-like, but every clause names a distinct check.

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?

For a read-only audit tool with a fully documented schema and no output schema, the description is nearly sufficient, covering every validation performed. The one gap is not hinting at the shape of the result (a list of issues versus a pass/fail verdict), which an agent would need to interpret the response.

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 100%, so all three parameters are already documented, and the description's mention of 'return link validation' largely restates checkReturnLinks. Baseline 3 applies since the schema does the heavy lifting and the description adds only mild framing.

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?

States a specific verb and resource ('Validate hreflang link elements on a page') plus the domain ('international SEO') and enumerates the exact checks (ISO 639-1 format, x-default, self-reference, duplicates, return links). No sibling in the catalog performs hreflang validation, so the agent can route here unambiguously.

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?

Clear context for when this is the right tool (international SEO hreflang auditing) and it explains the tradeoff that selects the optional return-link path ('slower but catches missing bidirectional links'). It stops short of explicit when-not-to-use guidance or pointing at a related audit tool such as analyze_page or audit_security_headers.

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