> For the complete documentation index, see [llms.txt](https://docs.urbit.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.urbit.org/build-on-urbit/tools/docs-app/index-file.md).

# Index File

Configuration guide for doc.toc index files in the %docs app, covering structure definition, hierarchical organization, file/directory specification, and automatic table of contents generation.

Each desk with docs may include a `doc.toc` file in its root. A `doc.toc` file looks something like this:

```
/dev                  Developer
  /hark-store         Hark-store
    /overview/udon    Overview
    /types/udon       Data Types
    /pokes/udon       Pokes
    /paths/udon       Subscription Paths
    /scry/udon        Scry Endpoints
  /settings-store     Settings-store
    /overview/udon    Overview
    /types/udon       Data Types
    /pokes/udon       Pokes
    /paths/udon       Subscription Paths
    /scry/udon        Scry Endpoints
```

Each line contains a pair of path and title with at least one space in between. A path with a single element (such as `/dev` and `/hark-store`) denotes a directory. A path with two elements (such as `/overview/udon`) denotes a file, where the first element is the name and the second is the mark.

Any directory structure and depth is allowed. The hierarchy is determined by indentation. Each double-space indent denotes a nesting level. Two spaces is one level, four spaces is two levels, etc.

The root is the `/doc` directory of your desk, it should not be explicitly listed.

The title specified will be displayed at the top of the document and in the table of contents for the desk.

If no `doc.toc` file is included, but a desk does have other files under `/doc`, the Docs app will infer a table of contents from the directory structure, and *all* files will be included. Files are ordered alphabetically, except that 'overview' always come first. For titles, hyphens in the filename are replaced with spaces and the whole is converted to Title Case.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.urbit.org/build-on-urbit/tools/docs-app/index-file.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
