Skip to main content
Glama

Check robots.txt for a URL

check_robots
Read-onlyIdempotent

Fetches a site's robots.txt and decides whether a specified crawler may fetch a URL, returning the allow/disallow decision, matched rule, crawl-delay, and sitemap URLs.

Instructions

Fetch the site's robots.txt and decide whether a crawler may fetch the URL.

Uses RFC 9309 / Google semantics: the most specific user-agent group applies (groups with the same token are merged, '' is the fallback); the longest matching rule wins and Allow wins ties; '' and '$' are wildcards. A 4xx robots.txt means allow-all, a 5xx or unreachable robots.txt means disallow-all. Returns the decision, the matched group and rule (with line number), Crawl-delay and the Sitemap URLs listed.

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

Input Schema

NameRequiredDescriptionDefault
urlYesAbsolute http(s) URL, e.g. https://example.com/page
user_agentNoCrawler user agent or product token, e.g. Googlebot, Bingbot, GPTBot, *Googlebot

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, openWorld and non-destructive, but the description adds substantial behavior beyond them: exact matching semantics (specificity, group merging, longest-rule-wins, Allow-wins-ties, wildcard support) and, critically, the failure modes where 4xx → allow-all and 5xx/unreachable → disallow-all. It stops short of noting fetch timeouts, caching, or rate-limit behavior, which is the only remaining gap.

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?

Purpose is front-loaded in the first sentence, with semantics following as supporting detail. The second paragraph is dense and earns most of its space, though the closing sentence enumerating return fields overlaps with the existing output schema and could be trimmed.

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?

For a two-parameter read-only tool with full schema coverage, annotations, and an output schema, this is complete: the agent knows what it fetches, how the decision is computed, what the error edge cases mean, and that the return includes the matched rule, Crawl-delay and sitemaps. Nothing needed for correct invocation is missing.

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 both url and user_agent are already documented with examples and a default. The description's explanation that '*' is the fallback group hints at the meaning of user_agent but adds no format or matching detail beyond the schema, so the baseline 3 applies.

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: 'Fetch the site's robots.txt and decide whether a crawler may fetch the URL.' The outcome-oriented framing (a yes/no decision) clearly distinguishes it from siblings like check_redirects, check_sitemap, or gsc_inspect_url, which inspect different artifacts.

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?

Usage is implied rather than stated — an agent can infer this is the pre-crawl permission check, but the description never says 'use this before crawling' or names when to prefer it over gsc_inspect_url or audit_page. It invests its words in RFC semantics instead of routing guidance.

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