Generate llms.txt
llms_txt_generateReads a domain's sitemap, fetches up to 100 pages, and outputs a spec-compliant llms.txt file with grouped sections. Optionally generates 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 llms_txt_validate 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. | |
| site_name | No | Override the site name used in the generated llms.txt header. If omitted, inferred from the homepage's <title> tag. | |
| 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_description | No | Override the site description used in the generated llms.txt header. If omitted, inferred from the homepage's meta description. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes | ||
| llms_txt | Yes | The generated llms.txt file content. Caller is responsible for hosting it. | |
| llms_full_txt | No | The generated llms-full.txt content. Null unless include_full=true. | |
| pages_indexed | Yes | Number of pages successfully sampled from the sitemap. |