Skip to main content
Glama
ayrank-tools

ayrank-tools

Official
by ay-automate

hreflang checker

ayrank_hreflang_check
Read-only

Check a page's hreflang tags and HTTP Link headers against Google's rules, validating language codes, self-reference, x-default, absolute URLs, and reciprocal links from alternates.

Instructions

Use to check one page's hreflang set (link tags in the head and the HTTP Link header) against Google's rules: valid codes, self-reference, x-default, absolute URLs, then whether up to 10 alternates answer, link back and self-canonicalize. Sitemap hreflang is not read. Free AY Rank API, no key. JavaScript is not run, so content added by scripts is not seen.

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

Input Schema

NameRequiredDescriptionDefault
urlYesThe page to check, like https://example.com/page.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations cover only readOnlyHint and openWorldHint; the description adds real behavioral context: free API with no key, JavaScript is not executed so script-injected content is invisible, and only up to 10 alternates are verified for reachability, link-back, and self-canonicalization. These are exactly the constraints an agent needs to interpret a result correctly and to avoid false conclusions about JS-rendered pages.

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?

Front-loaded with 'Use to check', then a compact enumeration of the rule set and the limitations. Every clause carries information, though the middle sentence stacks several checks into one long run-on that is slightly harder to scan than a short bulleted list would be.

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 single-URL, read-only diagnostic with no output schema, the description covers scope, the rules evaluated, the 10-alternate cap, and the JS limitation. What is missing is any hint of the result shape (pass/fail per check vs. a counted summary), which would help an agent plan how to consume the output.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There is a single parameter with 100% schema description coverage, so the baseline is 4. The description reinforces that the input is one page (not a site), which supports the schema's URL example without contradicting or duplicating it in detail.

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: check one page's hreflang set, covering both link tags in the head and the HTTP Link header, against Google's rules. It also scopes the tool by naming what it does not cover (sitemap hreflang), which separates it from a sitemap-oriented sibling like ayrank_sitemap_validate.

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 'Use to check one page's hreflang set' gives clear context for invocation, and 'Sitemap hreflang is not read' marks a boundary that tells the agent this is not a site-wide audit. It stops short of naming an explicit alternative for sitemap hreflang checks or stating prerequisites, so it is clear context without full when/when-not routing.

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