Generate robots.txt for AI
robots_txt_for_aiGenerate robots.txt User-agent rules for all known AI crawlers from a chosen policy (max_visibility, search_only, block_training, block_all_ai), with optional Content-Signal and Sitemap lines, to paste into an existing robots.txt. Use when writing AI crawler rules. Do NOT use to check a live site's current rules (use check_ai_readiness) or for bot background (use crawler_policy_guide).
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": {
"policy": "<policy>"
},
"name": "robots_txt_for_ai"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| policy | Yes | AI policy preset: max_visibility = allow every AI bot; search_only or block_training = allow search/answer bots, block training crawlers (same output); block_all_ai = disallow every known AI bot. | |
| sitemap_url | No | Optional absolute sitemap URL appended as a Sitemap: line, e.g. https://example.com/sitemap.xml. | |
| content_signals | No | Append a Content-Signal line (search / ai-input / ai-train) matching the policy. Default true; pass false to omit. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| notes | Yes | Guidance on merging and interpreting the rules. | |
| policy | Yes | The policy preset the rules were generated for. | |
| disclaimer | Yes | Informational disclaimer: crawler behaviour can change, verify against provider docs. | |
| robots_txt | Yes | Generated robots.txt text block, newline-terminated. |