Generate llms.txt from crawled content and useful page evidence.
Use this to generate an llms.txt draft from selected crawl content and useful page evidence. The result is a reviewable artifact, not a claim that publishing the file will improve rankings, indexing, citations, or AI visibility.
Run this report from the CLI, an MCP client, or application code. Every surface uses the same report definition and returns the same evidence. JSON is the source of truth; Markdown makes it readable without hiding dates, limits, warnings, or skipped work.
What this report helps you decide
What would a concise llms.txt draft look like for these selected site pages?
- The optional format is a deliberate publishing choice.
- A saved crawl provides a reviewable page inventory.
Command facts
- Report id
generate-llms-txt- Execution
Local process- Outputs
JSON and Markdown- Example parameters
reportId, maxUrls, tokenBudget, exclude- Agent discovery
seo reports describe generate-llms-txt --json- Interactive prompts
Human CLI commands only
When this report is not the right tool
These cases need a different report, more evidence, or a human decision. Do not force this report to answer a question its data cannot support.
- You need to check a published llms.txt file and the pages it links to. Recommended report: Audit an llms.txt file. Run the llms.txt audit after publishing. It fetches the live file, parses its entries, checks linked destinations, and compares them with limited crawl candidates.
- You need to decide whether the site should publish llms.txt at all. No automated report can make that product decision because the format is optional and does not guarantee crawling, citations, or rankings. Review who will maintain the file and whether the intended agent audience benefits from a curated page list; this generator can show the likely draft before you commit.
Data sources and inputs
- Saved or fresh crawl report. Supplies page URLs, titles, descriptions, and crawl exclusions.
- Selection limits and exclusions. Control the maximum URLs, token budget, and paths that should stay out of the draft.
What this report checks
- Selects eligible pages consistently within the requested URL and token limits.
- Keeps excluded, invalid, redirected, and unavailable pages out of the generated list.
How it works
- Selects limited candidate pages consistently and returns draft content plus generation metadata.
The JSON result keeps dates, thresholds, limits, skipped work, and source completeness beside the finding. Missing, partial, capped, filtered, and complete data remain different states.
Run the report from the CLI
Create an optional llms.txt draft from a saved crawl. Agents and CI should inspect the live schema before their first run.
Run it from the CLI
seo llms generate --project exampleCheck the agent input schema
seo reports describe generate-llms-txt --jsonRun it from an agent or script
seo reports run generate-llms-txt --params '{"reportId":"crawl_example_20260710","maxUrls":50,"tokenBudget":4000,"exclude":["/account/*","/search"]}' --jsonProject profiles can fill supported property and analytics inputs for the human-facing commands. The catalog form shown here is explicit by design, so agents and CI jobs do not prompt or guess.
How an MCP agent should use it
Call seo_describe_report first so the agent sees when this report is useful and gets the current input schema. Then callseo_run_report with the validated parameters. Read the status, warnings, source limits, and skipped sections before acting on a finding.
Describe the report with MCP
{
"id": "generate-llms-txt"
}Run the report with MCP
{
"id": "generate-llms-txt",
"params": {
"reportId": "crawl_example_20260710",
"maxUrls": 50,
"tokenBudget": 4000,
"exclude": [
"/account/*",
"/search"
]
}
}Use a follow-up report returned by the result instead of guessing the next tool. The local MCP server and CLI use the same report definition and evidence. Their outer transport envelopes differ.
Use the report in a TypeScript app
Install seo as a project dependency, then call the same report catalog used by the CLI and MCP. executeReportrejects an unknown report id or invalid parameters. Provider and runtime failures come back as structured results withisError set.
Install the library
npm install seoRun this report from TypeScript
import { executeReport } from 'seo/mcp'
const result = await executeReport(
'generate-llms-txt',
{
"reportId": "crawl_example_20260710",
"maxUrls": 50,
"tokenBudget": 4000,
"exclude": [
"/account/*",
"/search"
]
},
)
console.log(result)The TypeScript library guide also covers direct core functions, schema discovery, and the difference betweenexecuteReport and runReport.
What comes back and how to read it
- A reviewable llms.txt draft with the selected page titles, descriptions, and URLs.
- Generation metadata showing the crawl source, limits, exclusions, selected count, and caveats.
- Review every selected page and description. Publish only accurate, stable destinations that help a machine or person find core material.
Start with dataStatus, source details, warnings, and caveats. Then inspect the observed evidence before derived findings or suggested actions.
What this report cannot tell you
- The format is optional and has no guaranteed support or search benefit. Generated content still needs human ownership.
What to do next
- Validate the draft against the live site.
- Re-audit after publishing or changing important URLs.
Related reports
- Audit an llms.txt file. Check whether an optional llms.txt file is reachable, readable, and consistent with useful pages from the crawl.
- Check AI search technical readiness. Review crawl access, indexability, snippet controls, page structure, and optional agent resources without inventing an AI visibility score.
Sources behind the guidance
These primary sources define the provider data or search controls used in the interpretation above.
Browse all reports in Crawling and technical checks.