---
title: "How an AI reads these docs"
description: Learn how a connected AI assistant reads Turn Zero Cloud's documentation in parts: long pages in chunks, headings with offsets, single sections, and search.
slug: /concepts/reading-this-documentation-as-a-tool
order: 16
visibility: public
redirects_from: [/concepts/how-an-ai-reads-these-docs]
---

# How an AI reads these docs

Use `search_documentation` to find pages and `read_documentation` to read them through your Turn Zero Cloud connection. You can search for a few words, then read a whole page, one section, or a page's matching lines.

A Cloud tool name without a prefix is its HTTP API name; your MCP connection lists it with `tzcloud_` before it. On the Turn Zero connection, Cloud tools are listed as `tzcloud_<name>` and tzTrack tools as `tztrack_<name>`. Account tools such as `mint_token` keep their shorter names.

The “Machine surfaces of this documentation” section in the [Cloud overview's Markdown copy](https://dev.turnzero.ai/cloud/index.md) lists the files an AI assistant can read without an MCP connection. Each page has a Markdown copy at its address followed by `index.md`, such as `https://dev.turnzero.ai/cloud/guides/store-files/index.md`. Pages with a visible title also link their copy as View this page as Markdown. Send `Accept: text/markdown` to read the Markdown copy at the page's usual address.

## What the action reads

Call `read_documentation` with:

- `tree: "cloud"` for the page index.
- `tree: "cloud", part: "outline"` for pages and their headings.
- `page` for one page, with `section` to select a section.
- `page` with `query` for that page's lines holding a few words.

To search across pages, call `search_documentation` with `query`. Without `tree`, the search covers every documentation tree your account can read.

Leave `part` out to read a whole page, one section, or a page's matching lines. Use `part: "outline"` with a tree to list its pages and headings, or with `page` to list that page's headings. Use `part: "full"` for the written pages of a tree in one text, excluding generated reference and copies of the source contracts. With `page`, `part: "full"` reads that page. With `page`, `part: "full"` also reads the named `section` alone. Do not combine `outline` with `section`, or either `outline` or `full` with `query`. These reads still come in chunks.

For a link such as `/guides/store-files`, pass that route as `page` with `tree: "cloud"`, or prefix the route with `/cloud`.

Read an action's [reference page](/cloud/reference/action-catalog/) for its full arguments and result.

`read_context` reads the files that define the API, the platform overview and the platform's built-in skills. Each is an entry identified by its `id`. Call `read_context` without `id` to list their IDs, or with `id` to read one entry. A client that supports only tools reads the same content the [resources](/cloud/concepts/glossary/#resource) hold.

For another product your connection offers, the catalog lists a `skills:<product>` entry. Reading it lists that product’s skills by their prefixed names, with their descriptions and arguments. Read one with `read_context`, using `skill:<prefixed-name>`. These individual IDs can be read but are not listed in the catalog. The read sends no arguments; a client that shows prompts can run one with arguments itself.

For a product with no skills, such as tzTrack, the response is one line saying that it has none. A product your connection does not offer has no entry; reading it fails with `context_not_found`. While a product's server is down, the platform can return its last saved list of skills. With no saved list, it fails with `context_unavailable`, naming the server’s address. Reading an individual skill needs its server to answer; otherwise that read fails with `context_unavailable` too.

One `read_context` call with `id: "tools"` and `limit: 16000` returns the compact tool index whole. Its first line explains how to read a Turn Zero Cloud tool's reference page with `read_documentation`. Each remaining line gives a listed Turn Zero Cloud tool's name and its description's opening sentence, a long one shortened at a word. Where your account holds another product, the last line names that product's own entry, such as `id: "tools:tztrack"` with `limit: 16000`. That entry lists each tool with the whole opening sentence of its description, in one read.

## Long texts come in chunks

Start at `offset: 0` without a `stamp`. Every request with an offset above zero needs the matching stamp from an earlier response for the same text. If the tool returns `context_changed`, start again at zero without a stamp.

A long text comes back in chunks of about `limit` characters, 8,000 unless you set it. A chunk ends at the end of a line where the line fits, and never inside a code block that fits in one chunk. It never ends between a section heading and the section's first line of text where the two fit.

A JSON text from `read_context`, such as the manifest schema, follows one more rule, and so does a `.json` file read through `read_library`. The rule covers such a text written one member to a line. For a JSON field at the top level or one level below, a chunk keeps the field whole if it is shorter than half the requested limit.

To read on, pass each response's `next_offset` and `stamp`. The stamp is a fingerprint of the whole page or entry, the same in every chunk. Offsets count Unicode code points. Use the returned `next_offset` without recalculating it.

After the first response, you can also read the later chunks in parallel. Ask for one read at each multiple of the limit the tool uses, with the first response's `stamp` and the same other arguments. If your requested limit exceeds the maximum, use that maximum. Each response's `offset` says where its text starts, which can be a little before the offset you asked for. Those chunks join in order with nothing missing or repeated.

If your AI client truncates a response or a batch of results, read one chunk at a time at the default limit, or request one section at a time.

## Going straight to a section

When more page text follows and there are headings to list, the first chunk gives `headings` with an `offset` for each. To list the headings of a page that fits in one chunk, request `part: "outline"`.

To go straight to a section with a listed `offset`, read the page again with that offset and the page's first `stamp`. The answer then starts at that heading. To read a section alone, set `section` to its heading. Start at offset zero without the page's stamp. Where no heading or anchor matches exactly, letter case is ignored and each run of spaces or punctuation reads as one hyphen, so `going straight to a section` reads this section.

On a page with anchors, an unknown `section` is refused `context_not_found`, with a list of suggested anchors that fits the response's size limit. Anchors matching the most words of your value come first, with ties in page order. Retry with an anchor it lists, or read the page's headings with `part: "outline"`.

A page with more than 40 headings lists only its second-level ones; use `query` or `section` to reach a deeper one. The list contains at most 200 headings, and a heading longer than 200 characters is cut to 200. When either limit cuts the list, the `continuation` says the list is cut short.

## Searching

Search with `search_documentation` and a few distinctive words, such as a command name. Results come best first: a section ranks higher when it holds more of your words, when they are rare across the documentation, and when they stand in its page title or heading. [Documentation search](/cloud/reference/documentation-search/#how-sections-are-ranked) gives the full rule. The same search runs over HTTP with no sign-in.

Each hit gives the page title, section heading, route, anchor, and best matching line, and `text` gives the same hits as Markdown lines. To read a hit, call `read_documentation` with its route as `page` and its anchor as `section`. A link with a heading's anchor, passed as `page`, reads that section too. With `page` set, a `query` to `read_documentation` returns that page's matching lines, each with its offset. Use those offsets with the same `stamp` to read more.

Given a bare rule code as its `query`, `search_documentation` says it names a statement of the platform's specification and then lists the sections that hold it, each with its page and heading.

## Related

- [Connect your AI assistant](/cloud/getting-started/connect-your-tool/) makes the connection these reads use.
- The generated reference for [search_documentation](/cloud/reference/actions/search-documentation/), [read_documentation](/cloud/reference/actions/read-documentation/), and [read_context](/cloud/reference/actions/read-context/) gives each argument and its limits.
- [MCP resources and prompts](/cloud/reference/discovery/) lists the resources and prompts a connected AI assistant reads.
