generate_llms_txt
Generate a spec-compliant llms.txt file for a domain by reading its sitemap, sampling pages, and synthesizing a grouped summary. Optionally creates llms-full.txt with full page text.
Instructions
Generate a spec-compliant llms.txt (and optionally llms-full.txt) for a domain by reading its sitemap, sampling up to max_pages pages, and synthesizing a grouped, sectioned summary.
Read-only. Issues one HTTP GET for the sitemap then one per sampled page.
Deterministic; no LLM. Output is the file content as a string - this tool does NOT write to disk or upload anywhere. The caller is responsible for hosting the resulting file at https://<domain>/llms.txt.
When to use: bootstrapping llms.txt for a site you own. To check an existing llms.txt, use validate_llms_txt instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes | Hostname or origin to generate llms.txt for. Examples: `example.com`, `https://example.com`. The tool reads the domain's sitemap, fetches up to `max_pages` of them, and synthesizes a spec-compliant llms.txt grouped by section. Issues N+1 HTTP GETs: one for the sitemap, then one per sampled page. Read-only. | |
| max_pages | No | How many pages to sample from the sitemap when building section groupings. Default 30. Each page is fetched (one HTTP GET per page) - keep this low for large sites or rate-limited hosts. | |
| include_full | No | If true, also generate llms-full.txt (the expanded variant containing full page text, not just URLs and titles). Default false. The llms-full.txt output can be large; only enable when you actually plan to host both files. | |
| site_name | No | Override the site name used in the generated llms.txt header. If omitted, inferred from the homepage's <title> tag. | |
| site_description | No | Override the site description used in the generated llms.txt header. If omitted, inferred from the homepage's meta description. |