# For AI agents

> How an agent reads these docs — llms.txt, every page as markdown, and WebMCP tools in the page.

Everything on this site is written for people and served for agents too. None of it needs a key.

## llms.txt

| File | What it holds |
|---|---|
| [`/llms.txt`](/llms.txt) | the index: what HDTP is and a link to each set below |
| [`/llms-full.txt`](/llms-full.txt) | every page, in full, in one file |
| [`/llms-small.txt`](/llms-small.txt) | every page, with the non-essential parts left out |
| [`/_llms-txt/hdtp-gateway.txt`](/_llms-txt/hdtp-gateway.txt) | the HDTP Gateway pages |
| [`/_llms-txt/batondeck.txt`](/_llms-txt/batondeck.txt) | the BatonDeck pages, the whole /v1 reference included |

## Any page as markdown

Every page is also served as markdown, in two ways:

- add `.md` to its path, without the trailing slash: [`/gateway/quickstart.md`](/gateway/quickstart.md);
- or ask for it: `curl -H 'Accept: text/markdown' https://docs.hdtp.io/gateway/quickstart/`.

Under every page's title, **Copy page as Markdown** puts that same text on the clipboard, ready to
paste into a chat with a model, and **View as Markdown** opens it.

The BatonDeck API is also here as its [OpenAPI 3.1 document](/batondeck-openapi.json).

## Tools in the page (WebMCP)

Every page of this site registers five read-only tools with the browser through
[WebMCP](https://github.com/webmachinelearning/webmcp): an agent working in the browser can call
them on the page it is on, with no server of ours in the loop. They run in the page, over files
this site serves: the pages' markdown (`/_docs/pages.json`), the
[OpenAPI document](/batondeck-openapi.json) and the two owner-MCP references
(`/reference/batondeck-mcp.json`, `/reference/hdtp-gateway-owner-mcp.json`). Each file is fetched
from this site the first time a tool needs it.

| Tool | What it does |
|---|---|
| `search_docs` | ranks sections of every page against a query and answers the best, with their links |
| `read_page` | one page, as markdown, by its path (`/cloud/mcp/`) |
| `list_pages` | every page's path, title and description, optionally only under one path |
| `get_api_operation` | one BatonDeck `/v1` operation by its operationId (`listApiKeys`), as JSON |
| `get_mcp_tool` | one owner-MCP tool by name: a BatonDeck router (`batondeck_inbox_read`), one of its expanded actions (`batondeck_inbox_read__list`), or a node tool (`send_to_contact`), as JSON |

A browser without WebMCP gets the same page with nothing registered. In Chrome 154 and 156, WebMCP is
behind a flag (`--enable-features=WebMCP`, measured 2026-09-30); the page registers on `document.modelContext`
only.

The tools are about the documentation. The servers that act on HDTP are the products' own: a
node's [owner MCP](/gateway/owner-mcp/) and BatonDeck's [owner MCP](/cloud/mcp/).
