Skip to main content
Glama

generate_robots_txt

Read-onlyIdempotent

Generate a deploy-ready robots.txt from presets or custom rules, including sitemaps, allowed/disallowed paths, crawl delay, and per-user-agent directives.

Instructions

Generate a robots.txt file from configuration options. Specify sitemap URLs, disallowed/allowed paths, crawl delay, and custom per-user-agent rules. Alternatively use a preset ("permissive", "restrictive", "wordpress", "ecommerce") as a starting point. Returns the complete robots.txt content ready to deploy.

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_robots_txt"
  }
}

Input Schema

NameRequiredDescriptionDefault
presetNoStart from a named preset configuration. Custom options override preset values.
allowPathsNoURL paths to explicitly allow (used to override broader disallow rules).
crawlDelayNoCrawl-delay directive value in seconds.
customRulesNoAdditional per-user-agent rule blocks.
sitemapUrlsNoSitemap URLs to include in the robots.txt.
disallowPathsNoURL paths to disallow for all bots (e.g. ["/admin/", "/private/"]).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.1

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true and openWorldHint=false, so the safety profile is covered. Beyond that, the description adds genuinely useful behavior: the tool returns complete robots.txt content 'ready to deploy' rather than writing a file, and that custom options override preset values — important for predicting the result. It does not discuss size limits or how conflicting rules are ordered.

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 sentences, front-loaded with the action, followed by configuration scope, preset alternative, and return value. Every clause carries information and there is no filler or repetition of the name/title.

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?

There is no output schema, and the description compensates by stating that the result is the complete robots.txt content ready to deploy. With annotations covering the read-only/idempotent profile and the schema covering all six parameters, an agent has everything needed to call this 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%, with each of the six parameters documented including the preset enum. The description only restates those same categories in prose; the one piece of added meaning, that custom options override presets, is already stated in the schema for 'preset'. Baseline 3 applies since the schema carries the semantic load.

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 opens with a specific verb and resource: 'Generate a robots.txt file from configuration options.' It then enumerates exactly what can be configured (sitemaps, allow/disallow paths, crawl delay, per-user-agent rules), which cleanly separates it from the analyze_robots_txt sibling that inspects rather than produces files.

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?

It gives clear when-to-use context by presenting two modes: supply custom configuration, or start from a named preset. That is actionable routing guidance within the tool, but it stops short of explicit exclusions or naming a sibling (e.g., where to go to inspect an existing robots.txt), so it falls short of a 5.

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