Skip to main content
Glama
ayrank-tools

ayrank-tools

Official
by ay-automate

robots.txt tester

ayrank_robots_txt_test
Read-only

Test a URL against a site's robots.txt for a specified user agent to see if crawling is allowed; returns the deciding rule and lines that do not affect the result.

Instructions

Use to test one URL against the site's robots.txt for one user agent (RFC 9309: named group else *, longest match, Allow wins a tie). Returns allowed, the deciding line and lines that decide nothing. Not for meta robots or X-Robots-Tag (use ayrank_http_headers or ayrank_ai_overview_eligibility), and it does not write a robots.txt (use ayrank_robots_txt_generate).

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_robots_txt_test"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesThe page to test, like https://example.com/blog/post. Path and query are matched.
userAgentNorobots.txt product token. Default Googlebot. Presets: Googlebot, Bingbot, GPTBot, OAI-SearchBot, ChatGPT-User, ClaudeBot, Claude-SearchBot, PerplexityBot, Google-Extended, Applebot-Extended, CCBot.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations only cover readOnlyHint and openWorldHint; the description adds real value by disclosing the evaluation algorithm (named group else *, longest match, Allow wins a tie) and the return payload (allowed, deciding line, non-deciding lines). It stops short of stating behavior when robots.txt is missing, unreachable, or 5xx, or whether results are cached.

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 the action and its scope, then the algorithm, then the return shape, then the routing exclusions — a sensible order with no filler. It is dense in one block and the three-way exclusion list makes it longer than strictly minimal, but each clause carries information.

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 two-parameter read-only tool with no output schema, the definition covers purpose, algorithm, return fields, and alternatives, which is nearly everything an agent needs. The gap is failure-mode behavior (no robots.txt, network error, redirect handling), which matters for an open-world fetch tool.

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%, and the schema already documents the URL format, the default Googlebot agent, and the preset token list. The description only restates 'one user agent', adding no new meaning about matching or format. Baseline 3 applies when the schema carries the parameter burden.

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: 'test one URL against the site's robots.txt for one user agent'. The scope qualifiers (one URL, one user agent) and the RFC 9309 matching rule make it immediately distinguishable from the generate and header-inspection siblings.

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

Usage Guidelines5/5

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

Explicit exclusions with named alternatives: not for meta robots or X-Robots-Tag (route to ayrank_http_headers or ayrank_ai_overview_eligibility), and not for writing robots.txt (route to ayrank_robots_txt_generate). This is the when/when-not/alternative triad done properly.

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