Skip to main content
Glama

robots_txt

Read-onlyIdempotent

Fetch and parse a domain's robots.txt to respect allow/disallow rules, sitemaps, and crawl-delay before crawling or scraping.

Instructions

Fetch + parse the target domain's robots.txt โ€” sitemaps, per-User-agent allow/disallow rules, crawl-delay, Host directive. Use BEFORE crawling/scraping a target site (seo_audit, brand_assets, redirect_chain) to honour the site's published rules. status_code=404 means no robots.txt exists = implicit allow-all per RFC 9309 ยง2.4. ContrastAPI fetches with User-agent: ContrastAPI/<version> (+https://contrastcyber.com/bot) so site operators can identify + opt out via robots.txt; we honour Disallow: / for our UA in seo_audit and brand_assets. Per-target eTLD+1 throttle (60 req/min) prevents weaponising this endpoint against a single site; subdomain rotation collapses to the same bucket. Free: 30/hr, Pro: 500/hr. Returns {domain, fetched_url, status_code, sitemaps, user_agents:{ua:{allow,disallow,crawl_delay}}, host, truncated, summary}. Returns 502 ErrorResponse if the target rejected the connection (DNS/TCP/TLS failure); the agent should NOT assume "no robots" in that case โ€” it's an upstream-failure signal.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYesRegistrable domain to fetch robots.txt for (e.g. 'example.com', 'github.com'). No scheme, no path, no port. Subdomains accepted; the bot fetches https://<domain>/robots.txt with HTTP fallback.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Discloses that ContrastAPI fetches with a custom User-Agent, honours Disallow for seo_audit and brand_assets, and has per-target throttling. The 502 error handling is explicitly described. Annotations already indicate read-only, destructive, idempotent, and open-world hints, and the description adds valuable context without contradiction.

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?

The description is detailed and well-structured, front-loading purpose and usage. Every sentence adds value, though some technical details (exact User-Agent string, RFC citation) could be trimmed for brevity. Still, it remains clear and organized.

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 tool with one parameter, an output schema, and complex behavior, the description covers input validation, edge cases (404, 502), output fields (domain, fetched_url, status_code, sitemaps, user_agents, etc.), rate limits, and use-case constraints. Nothing significant is missing.

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

Parameters5/5

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

Schema covers domain parameter 100%. Description adds crucial context: 'registrable domain', no scheme/path/port, subdomains accepted, and that the bot fetches from https://<domain>/robots.txt with HTTP fallback. This exceeds schema documentation.

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 states it fetches and parses robots.txt, listing specific data like sitemaps and rules. It distinguishes itself from sibling tools by specifying use before crawling/scraping (seo_audit, brand_assets, redirect_chain).

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?

Explicitly says when to use (BEFORE crawling/scraping), explains edge cases (404 means no robots.txt, implicit allow-all; 502 indicates upstream failure, not 'no robots'), and details rate limiting (60 req/min per eTLD+1). Free and Pro limits are also provided.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/UPinar/contrastapi'

If you have feedback or need assistance with the MCP directory API, please join our Discord server