llms.txt

v0.3.0
io.github.basitalisandhu/mcp-llms-txt Checked 1 day ago Published 1 month ago

Build 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…

ParameterTypeDescription
directory *string
title *stringH1 title, usually the project name.
base_urlstringPrefix for links, for example https://docs.example.com. Default: root-relative paths.
descriptionstringOne-sentence summary for the blockquote.
detailsstringOptional paragraph(s) placed after the summary.
include_dirsarrayOnly scan these top-level directories (use "." to keep root files).
max_filesintegerDefault 1000.
optional_sectionsarray
url_stylestring

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.

ParameterTypeDescription
path *stringLocal path to sitemap.xml.
title *string
descriptionstring
detailsstring
exclude_prefixarray
include_prefixarray
max_urlsintegerDefault 1000.
optional_sectionsarray

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.

ParameterTypeDescription
contentstring
pathstring