Skip to main content
Glama

robots_txt

Read-onlyIdempotent

Fetch and parse a domain's robots.txt to honor allow/disallow rules, sitemaps, and crawl delay before scraping or auditing the site.

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?

The description discloses the user-agent string used (ContrastAPI/<version>), how Disallow: / is honoured for that user-agent in sibling tools, per-target eTLD+1 throttle (60 req/min), and return types including error responses. This adds significant context beyond the annotations (readOnlyHint, etc.).

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 verbose but well-structured: purpose, usage, behavior, rate limits, return shape, error handling. Each sentence adds value, though slight tightening could improve conciseness.

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?

Given the tool's complexity (robots.txt parsing), the description covers purpose, usage, behavioral details, return structure (listing fields), and error scenarios. An output schema exists, so explicit return type details are not needed, but the description still provides a clear shape.

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?

The single parameter 'domain' has thorough schema description (100% coverage) explaining format and behaviour. The description does not significantly add to the parameter semantics beyond what the schema already provides, so a baseline of 3 is appropriate.

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 the tool fetches and parses robots.txt, listing specific data returned (sitemaps, allow/disallow rules, etc.). It distinguishes from sibling tools by mentioning use before crawling/scraping and naming tools like 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?

The description explicitly states to use the tool BEFORE crawling/scraping a target site and lists sibling tools that should follow its results. It explains the meaning of status_code=404 (implicit allow-all) and warns against assuming 'no robots' on 502 errors. Rate limits and user-agent are 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