llms.txt
v0.3.0Build llms.txt from local Markdown or a sitemap.xml and check an existing llms.txt file.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
generate_llms_txt Generate llms.txt from Markdown
Scan a local directory (recursively, skipping node_modules, .git, build output and hidden directories, up to max_files files) for .md, .mdx and .markdown files and return an llms.txt. Each file's title comes from frontmatter, its first H1 or the file name; its notes from frontmatter description or the first paragraph (trimmed to 200 characters). Files are grouped into sections by top-level folder (root files under Docs). URLs are base_url plus the relative path, with .md stripped and README/index mapped to the folder unless url_style is keep-extension. Sections named in optional_sections are m…
| Parameter | Type | Description |
|---|---|---|
directory * | string | |
title * | string | H1 title, usually the project name. |
base_url | string | Prefix for links, for example https://docs.example.com. Default: root-relative paths. |
description | string | One-sentence summary for the blockquote. |
details | string | Optional paragraph(s) placed after the summary. |
include_dirs | array | Only scan these top-level directories (use "." to keep root files). |
max_files | integer | Default 1000. |
optional_sections | array | |
url_style | string |
generate_from_sitemap Generate llms.txt from a local sitemap.xml
Read a sitemap.xml from a local path (download it first; this tool does not fetch URLs) and return an llms.txt with one link per <url>, grouped into sections by the first path segment. Titles are derived from the last path segment because page content is not fetched, so notes are empty; edit them afterwards. include_prefix and exclude_prefix filter by URL path. Child sitemaps in a sitemap index are listed but not read.
| Parameter | Type | Description |
|---|---|---|
path * | string | Local path to sitemap.xml. |
title * | string | |
description | string | |
details | string | |
exclude_prefix | array | |
include_prefix | array | |
max_urls | integer | Default 1000. |
optional_sections | array |
check_llms_txt Check an llms.txt file
Validate llms.txt text (from a local path or inline content) against the convention: exactly one H1 first, an optional blockquote summary, H2 sections containing only '- [name](url): notes' items, no deeper headings, no duplicate URLs or sections, a modest size. Returns errors (convention violations), warnings, info (such as links without notes or relative URLs) with line numbers, and statistics.
| Parameter | Type | Description |
|---|---|---|
content | string | |
path | string |