Skip to content
Thally
Log inGet started
Guide

Published · 7 min read

Rendered web pages make it hard to trace where an AI answer came from. Learn how a structured JSON documentation export gives tools typed docs and evidence.

By Published Updated

When an AI assistant answers a question about your product, where did the answer come from? And could you check it? If your docs exist only as rendered web pages, the honest answer to both is "not sure." A structured JSON documentation export changes that. It gives AI tools a typed, predictable version of your docs, and when it carries evidence, it gives people a way to verify what the tool said.

This explainer covers what the export is, what belongs in it, how it fits with llms.txt and MCP, and how to keep it from going stale.

What structured JSON adds beyond the HTML site

Your HTML site is built for browsers and people. It has navigation, layout, scripts, and tabs that hide content until someone clicks. An AI tool reading that page has to strip the chrome, guess where one section ends and the next begins, and hope the code sample survived.

Markdown output fixes much of that. It is clean and easy for a model to read. But Markdown is still prose, and a program that wants "every page about authentication in the current version" has to parse text to find it.

JSON makes the structure explicit. Each page becomes a record with named fields, so a tool can filter, chunk, and index without guessing.

What a structured JSON documentation export should contain

The exact schema varies by tool, but a useful export generally includes:

  • A stable ID and canonical URL for each page, so answers can link back
  • Title, description, and position in the docs hierarchy
  • Sections split by heading, each addressable on its own
  • Code blocks kept separate from prose, with the language labeled
  • Version and last-updated metadata
  • Evidence for the content, covered in the next section

The practical gain is predictability. Retrieval pipelines, internal support bots, and coding assistants can all consume the same records without a custom scraper for each one. The broader ecosystem is heading the same way: OpenAI reports that its gpt-4o-2024-08-06 model with Structured Outputs scores a perfect 100% on its evals of complex JSON schema following. Models and the tooling around them work well with schemas, and your docs can meet them there.

Include evidence with the export

Structure tells a tool what the docs say. It does not tell anyone why they should believe it, and that gap matters.

In the 2025 Stack Overflow Developer Survey, more developers actively distrust the accuracy of AI tools (46%) than trust it (33%), and only 3% report "highly trusting" the output. The top reason developers would still ask a person for help is "When I don't trust AI's answers," cited by 75%. Your users are already skeptical of what an assistant tells them about your API. A clean JSON file does not fix that on its own.

Evidence does. In a docs export, evidence means the record carries pointers to what backs the content. That can include:

  • The source file the page was built from
  • The pull request or commit that last changed the behavior described
  • When the content was last reviewed or updated

With those fields in place, an assistant can cite a specific section instead of paraphrasing from memory. A developer can follow the citation and confirm it. Your own team can audit a bad answer and trace it to a specific record rather than arguing about what the model "must have read."

Evidence does not make a model correct. It makes an answer checkable. For an audience where 87% of survey respondents say they are concerned about accuracy, checkable is the bar to clear.

Ship it with llms.txt and MCP tools

A JSON export is one of three pieces. Each does a different job, and they work best together.

llms.txt: the index

llms.txt is a proposal to standardize on a /llms.txt file that provides information to help agents use a website. The file itself stays small enough to fit in context, and the detail lives behind the links, fetched only when needed. Think of it as a table of contents written for machines.

Be realistic about what it does. According to Search Engine Land, Google says llms.txt is not needed for AI search visibility, though Chrome Lighthouse's "Agentic Browsing" audits now check whether a site has one. Its value is orientation: without it, agents may spend more time crawling the site to understand its high-level structure and primary content. It is cheap to publish, but it is not a ranking trick.

Structured JSON: the content

The export is what the index points to when a tool needs more than a link list. It is the bulk, machine-readable copy of your docs, with structure and evidence attached.

MCP tools: the live interface

The Model Context Protocol is a standard for connecting AI assistants to the systems where data lives, including content repositories. Instead of maintaining separate connectors for each data source, developers can build against a standard protocol. For docs, that means an assistant like Claude or Cursor can call a tool to search or fetch a page on demand rather than relying on whatever it crawled months ago.

MCP is also where your JSON schema pays off. Under the draft specification, structured content is returned as a JSON value in the structuredContent field of a result, and when a tool defines an outputSchema, servers must provide results that conform to it. Clients should validate against that schema. If your export already has a stable shape, your MCP tools can return the same records, and every consumer sees one consistent format.

Publish JSON from the same MDX source as the site

A common question from teams goes like this: how do we publish machine-consumable documentation without forcing writers to learn a complicated workflow?

The answer is that writers should not touch the JSON at all. If someone maintains the export by hand, or a script scrapes the live site on a schedule, you now have two copies of your docs, and they will drift. The export should be a build output, generated from the same source as the site.

MDX works well as that source. Headings, frontmatter, and components are already structured, so a build step can emit HTML for readers and JSON for tools from one file. Writers keep writing docs and reviewing pull requests, and nothing about their day changes.

The same idea answers the related question of which platforms work for both human readers and AI assistants. Skip the feature checklist and ask four things:

  • Is there one source for every output, or separate copies to maintain?
  • Does the content live in Git, where review and history already exist?
  • Does anything publish without a person approving it?
  • Does the platform keep content accurate after launch, not just make the first draft look polished?

Thally is built on this model: its Content Graph takes MDX and publishes HTML, Markdown, JSON, and llms.txt from one source, and its Agent Layer adds MCP tools and structured JSON with evidence. Whatever you choose, hold it to the single-source test. That one decision gives you most of the collaboration and governance you need, because every output inherits the same review.

Refresh the export when a merge changes the product

What happens to your export when a merged pull request renames a parameter?

If nothing happens, you have a problem that is worse than a stale web page. A person reading old docs might notice the date or the odd screenshot. An AI tool reading a stale JSON record will deliver the wrong answer in a confident, well-formatted sentence, and its citation will make it look verified.

A refresh on a timer does not solve this, because the export is only as current as the source behind it. The trigger that matters is the merge:

  • A pull request merges and changes product behavior
  • The affected docs pages are identified from the change itself
  • A draft docs update is opened as a pull request, with the evidence attached
  • A person reviews and approves it
  • The build regenerates the site, the Markdown, the JSON, and llms.txt together

The fourth step is not optional. Automated drafts save time, but a human approving each change is what keeps the evidence in your export honest. This is the loop Thally automates: it traces merged pull requests to the pages they affect and opens evidence-backed update PRs, and nothing publishes without human approval.

To recap what a trustworthy structured JSON documentation export needs:

  • A predictable schema
  • Evidence on every record
  • An llms.txt index and MCP tools alongside it
  • A single MDX source
  • A refresh tied to merges

Get those five right, and when someone asks where an AI answer came from, you can point to the exact record behind it.

Sources

  1. The /llms.txt file
  2. Tools – Model Context Protocol specification (draft)
  3. Introducing the Model Context Protocol
  4. 2025 Stack Overflow Developer Survey – AI
  5. Introducing Structured Outputs in the API
  6. Google adds llms.txt check to Chrome Lighthouse
  7. Technical Documentation Platforms: How to Choose | Thally
  8. Best Documentation Automation Software in 2026 | Thally
  9. Best AI Documentation Tools in 2026 | Thally

Published under the Thally editorial policy. Technical conformance is defined in the agent-readiness methodology.

Build docs that stay close to your product.

Create a managed site, or use the open-source engine to run Thally yourself.