> For the complete documentation index, see [llms.txt](https://doc.ripcapsule.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.ripcapsule.io/draft/publishing.md).

# Publishing this space

This folder is the GitBook space. Saving these files in the repository does not publish them. Publish only after a change request is accepted.

`home/`, `api-reference/`, `changelog/`, and `help-center/` are leftover GitBook starter files. They are not this space. Git Sync uses `documentation/` through `gitbook-docs.yaml` at the repository root.

## Layout

Git Sync expects this shape. The site map at the repository root points a space at this directory:

```
gitbook-docs.yaml          # site map, repository root
documentation/
  .gitbook.yaml            # this space
  README.md                # first page
  SUMMARY.md               # sidebar
  .gitbook/vars.yaml       # space variables
```

`SUMMARY.md` is the navigation. Each page is listed once. GitBook reads `README.md` as the first page.

## GitBook MCP

Editing a live GitBook space uses GitBook MCP, not the read-only server that a published site grows later.

* Endpoint: `https://mcp.gitbook.com/mcp`
* Transport: streamable HTTP. `stdio` and SSE are not supported.
* Opening that URL in a browser returns an error. An MCP client calls it.
* Sign in with OAuth, or send a personal access token as `Authorization: Bearer <token>`.
* Tokens are created at [GitBook developer settings](https://app.gitbook.com/account/developer). Do not commit a token.

After a site is published, readers get a separate read-only server at `{docs-site-url}/~gitbook/mcp`. That server does not see drafts. It does not exist until the site is published.

## Before a sync

1. Read the pages and correct anything that has changed on the site.
2. Keep `.gitbook/vars.yaml` matched to [Contracts](/product/contracts.md).
3. Connect GitBook MCP or GitHub Sync, and open a change request.
4. Publish only after the change request is accepted.

Do not point Git Sync at the repository root without `gitbook-docs.yaml`. The app is not the docs space. The space directory is `documentation/`.


---

# 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://doc.ripcapsule.io/draft/publishing.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.
