Skip to content

Treat a JSON page at /llms.txt as absent - #82

Merged
lbesecker195 merged 1 commit into
mainfrom
fix/documents-reject-json
Oct 1, 2026
Merged

lbesecker195 merged 1 commit into
mainfrom
fix/documents-reject-json

Conversation

@lbesecker195

Copy link
Copy Markdown
Owner

Closes #81.

A sample of what the fetcher from #75 stored in production:

First thing in the body Count
Markdown heading (# …), as llms.txt specifies 1,962
other — mostly genuine: front-matter, comments, prose 20
JSON 4
"not found" text 2

The JSON ones are API hosts answering every path with a status document, served as text/plain — e.g. {"status":"ok","server":"mock-mcp-server","version":"1.0.0"}. The HTML check catches single-page-app fallbacks but not these. Neither file format is JSON, and a status page with a timestamp would record a fake "llms.txt changed" every week.

A JSON content type, or a body that parses as JSON, now counts as absent. The test reproduces the production case.

Tests: 227 passing.


Pages affected:

🤖 Generated with Claude Code

Of 1,988 llms.txt files fetched in production, 1,962 open with a Markdown
heading as the format specifies. Four are JSON: API hosts answering every
path with a status document, served as text/plain.

The HTML check caught single-page-app fallbacks but not these. Neither
llms.txt nor AGENTS.md is JSON, and a status page carrying a timestamp
would record a fake change on every weekly check.

- A JSON content type, or a body that parses as JSON, counts as absent
- Test reproduces the production case

Closes #81

---

Pages affected:

- [MCP server changelog](https://ai.mcpharbor.dev/changelog) -- kept free of fake llms.txt changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lbesecker195
lbesecker195 merged commit 1bbc326 into main Oct 1, 2026
@lbesecker195
lbesecker195 deleted the fix/documents-reject-json branch October 1, 2026 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JSON catch-all pages are stored as llms.txt

1 participant