# Docs for AI

> Every page on this site is published for models as well as people. llms.txt and llms-full.txt, a Markdown version of every page and API operation, structured data, and one-click handoff to AI assistants.

Source: https://developer.kustomer.com/docs/ai/docs-for-ai

If you're asking an AI assistant to write code against Kustomer, give it these docs rather than letting it rely on what it remembers. Everything here is available in plain formats that fit in a context window and stay current with the site.

| Format          | URL                                                                                                                                  | Use it for                                                                                          |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------- |
| `llms.txt`      | [`/llms.txt`](https://developer.kustomer.com/llms.txt)                                                                               | An index of every page with a one-line description, following [llmstxt.org](https://llmstxt.org)    |
| `llms-full.txt` | [`/llms-full.txt`](https://developer.kustomer.com/llms-full.txt)                                                                     | Every docs page in one Markdown file                                                                |
| Markdown pages  | Any docs URL + `.md`, for example [`/docs/get-started/quickstart.md`](https://developer.kustomer.com/docs/get-started/quickstart.md) | One page, without navigation or scripts                                                             |
| API Markdown    | [`/api.md`](https://developer.kustomer.com/api.md), `/api/<spec>.md`, `/api/<spec>/<operation>.md`                                   | The API overview, each API's operation list, and every operation's parameters, bodies and responses |

## llms.txt

[`/llms.txt`](https://developer.kustomer.com/llms.txt) is a Markdown index: a summary of the platform, then a link and description for every docs page grouped by section, then the API references. It's small enough to paste into any assistant, which can then fetch only the pages it needs.

[`/llms-full.txt`](https://developer.kustomer.com/llms-full.txt) concatenates every docs page. Use it when your tool can't fetch URLs, or to load the docs into a project knowledge base. It doesn't include the per-operation API reference; for that, use the API Markdown.

## Markdown versions

Add `.md` to any docs page URL to get its Markdown source, rendered for reading by a model:

```bash
curl https://developer.kustomer.com/docs/apps/app-definition.md
curl https://developer.kustomer.com/api/core-resources/get-customer-by-email.md
```

- Components become standard Markdown: callouts become blockquotes, field lists become bulleted lists, tabs become labeled sections, and endpoint badges become the method and path with a link to the reference.
- Every interactive diagram on the site has a written description, and the Markdown version includes it in place of the animation. Mermaid diagrams stay as Mermaid source.
- Code samples are kept with their language tags.

Each HTML page links its Markdown version in its structured data (below), so crawlers can find it.

## Page actions

Every docs page has a **Copy page** button that copies its Markdown, and a menu to:

- **View as Markdown**: opens the `.md` version.
- **Open in ChatGPT**, **Open in Claude**, or **Open in Cursor**: starts a conversation with a prompt that points the assistant at the page, so you can ask questions or build from it.

## Operation index

To give an agent the API as tools, use the [kusty MCP server](https://developer.kustomer.com/docs/ai/kusty-mcp).

[`/api/operations.json`](https://developer.kustomer.com/api/operations.json) lists every operation with its `operationId`, method, path, tag and reference URL, for tools that need to map an `operationId` to its documentation:

```json
{ "spec": "core-resources", "slug": "get-customer-by-email", "operationId": "GetCustomerbyEmail", "method": "GET", "path": "/v1/customers/email={email}", "summary": "Get customer by email", "tag": "Customers", "deprecated": false, "url": "https://developer.kustomer.com/api/core-resources/get-customer-by-email" }
```

## Docs MCP server

The docs MCP server lets an assistant search and read these docs as tools, instead of fetching pages itself. It's read-only and needs no Kustomer credentials. The [kusty MCP server](https://developer.kustomer.com/docs/ai/kusty-mcp) is the one that calls the API.

| Tool            | Arguments                                         | Returns                                                                                                                                                                                           |
| --------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `search_docs`   | `query`, `kind` (`all`, `docs` or `api`), `limit` | Ranked guides and endpoints with URLs, Markdown paths and snippets. Matches endpoint paths such as `/v1/conversations`.                                                                           |
| `get_page`      | `path` (URL, path or slug), `section`, `outline`  | A page as Markdown, one heading's section, or just its outline                                                                                                                                    |
| `get_operation` | `operation`, `spec`                               | One endpoint's roles, parameters, body and responses. Accepts an `operationId`, `"GET /v1/customers/{id}"`, a concrete path such as `"GET /v1/customers/5f1b…"`, a reference URL, or `spec/slug`. |

It runs over stdio with [Bun](https://bun.sh) from a checkout of the docs source, and reads from developer.kustomer.com, so there's nothing to build:

```json title="mcp.json"
{
  "mcpServers": {
    "kustomer-docs": {
      "command": "bun",
      "args": ["/path/to/kustomer-developer-docs/mcp/server.ts"]
    }
  }
}
```

Set `KUSTOMER_DOCS_URL` to read from another deployment. In a checkout that has run `bun run prebuild`, it reads the local build instead.

> **Use both servers together:** With `kustomer-docs` and `kusty` installed, an assistant can look up an endpoint with `get_operation`, then call it with the matching kusty tool, checking the request with `dry_run` first.

## Structured data

Every page includes `TechArticle` (docs) or `APIReference` (operations) JSON-LD with its title, description, section and canonical URL, and an `encoding` entry pointing at its Markdown version:

```json
{
  "@context": "https://schema.org",
  "@type": "TechArticle",
  "headline": "App definition",
  "url": "https://developer.kustomer.com/docs/apps/app-definition",
  "encoding": { "@type": "MediaObject", "encodingFormat": "text/markdown", "contentUrl": "https://developer.kustomer.com/docs/apps/app-definition.md" }
}
```

## Prompting tips

#### Pin the docs, not the model's memory

Older Kustomer examples on the web use retired endpoints, deprecated SDK calls and outdated versions. Tell the assistant to use these docs: "Use <https://developer.kustomer.com/llms.txt> as the source of truth for the Kustomer API."

#### Give it the exact page

For a focused task, paste the URL of the page plus `.md`, such as the operation it should call. A single page is more reliable than the whole corpus.

#### Let it check the request

Ask the assistant to validate request bodies against the operation's schema in the API reference, or use kusty's `--dry-run` and schema validation to check its requests before they run.
