Skip to main content
Glama

Write robots.txt rules for AI crawlers

generate_ai_robots_rules
Read-onlyIdempotent

Write robots.txt groups for every AI crawler from a simple policy: allow or block search crawlers, crawlers that fetch pages when a user asks, and training crawlers, keeping private paths private. Use this when someone wants to allow AI search but block AI training (or any other mix), or asks for an AI-ready robots.txt. Returns the text to paste plus notes on crawlers that may ignore robots.txt.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "generate_ai_robots_rules"
  }
}

Input Schema

NameRequiredDescriptionDefault
sitemap_urlNoThe sitemap URL to list
allow_searchNoAllow crawlers that build AI search indexes (OAI-SearchBot, Claude-SearchBot, PerplexityBot…)
private_pathsNoPaths no crawler should read, for example /admin or /checkout
allow_trainingNoAllow crawlers that collect pages for model training (GPTBot, ClaudeBot, CCBot…)
allow_user_requestsNoAllow crawlers that fetch a page because a user asked (ChatGPT-User, Claude-User, Perplexity-User…)

Output Schema

NameRequiredDescriptionDefault
statusYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive, closed-world), so the description's job is to add context — and it does, disclosing that the output includes paste-ready text plus notes on crawlers that may ignore robots.txt, a caveat not expressible in annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight sentences: what it produces, when to use it, and what comes back. The policy abstraction and return content are front-loaded with no filler.

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?

An output schema exists, yet the description still summarizes the return shape and flags the ignore-robots caveat. With all five params documented and zero required inputs, an agent has everything needed to invoke it correctly.

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 the schema already documents each parameter with concrete bot examples. The description adds the framing that the booleans form a coherent policy and that private paths stay private, but no syntax or format detail beyond the schema — baseline 3.

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?

Specific verb (write/generate) plus resource (robots.txt groups for AI crawlers) and a stated input abstraction ('a simple policy'). It is clearly distinguishable from siblings like check_ai_crawlers or list_ai_crawlers, which inspect rather than produce rules.

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?

Explicit when-to-use clause: 'Use this when someone wants to allow AI search but block AI training (or any other mix), or asks for an AI-ready robots.txt.' It doesn't name a sibling alternative, but the generate-vs-check distinction is implied by the verb.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources