# Config schema

> The JSON Schema document of every synced config kind: its version, every key it defines, and where the latest document is served.

Canonical URL: https://www.clai.chat/docs/reference/config-schema/ · Version: 1.0 · Updated: 2026-11-10

Full site index: https://www.clai.chat/llms.txt

Every synced config kind has one JSON Schema document (draft 2020-12), and
that document is the shape authority: the editor on [clai.chat](https://www.clai.chat)
draws its fields from the document, and the same document decides what the
server accepts when you save. clai's own loaders stay lenient, as they always
were, so a file the editor warns about still runs.

The documents are shipped inside the CLI and served here byte for byte:

- `/schema/<kind>.json` answers the highest version of that kind.
- `/schema/<kind>-<version>.json` keeps one version, so an older editor and an
  older server still agree.

A published version never disappears: a kind that gains a member gains a new
document version, and the version before it keeps answering its own URL. The
same document is what `clai config schema <kind>` prints, and what
`clai config validate <kind> <file>` judges a file with.

## The documents

| Kind             | Version | Document URL                                       |
| ---------------- | ------- | -------------------------------------------------- |
| `mcp-servers`    | 1.0     | `https://clai.chat/schema/mcp-servers-1.0.json`    |
| `photo-config`   | 1.0     | `https://clai.chat/schema/photo-config-1.0.json`   |
| `profile`        | 1.0     | `https://clai.chat/schema/profile-1.0.json`        |
| `shell-contexts` | 1.0     | `https://clai.chat/schema/shell-contexts-1.0.json` |
| `skills-json`    | 1.0     | `https://clai.chat/schema/skills-json-1.0.json`    |
| `text-config`    | 1.0     | `https://clai.chat/schema/text-config-1.0.json`    |
| `theme`          | 1.0     | `https://clai.chat/schema/theme-1.0.json`          |
| `video-config`   | 1.0     | `https://clai.chat/schema/video-config-1.0.json`   |

## mcp-servers keys

Version 1.0. Every key the document defines, in its order.

| Member                    | Type     | Notes                                                                                        |
| ------------------------- | -------- | -------------------------------------------------------------------------------------------- |
| `name`                    | string   | A label: `-p <name>` finds `profiles/<name>.json`.                                           |
| `command`                 | string   | The program that starts the server.                                                          |
| `args`                    | string[] | The arguments the command takes.                                                             |
| `url`                     | string   | The server's endpoint, for a remote transport.                                               |
| `env`                     | object   | Environment variables passed to the server.                                                  |
| `envfile`                 | string   | A file whose variables pass to the server.                                                   |
| `timeout_seconds`         | integer  | How long one call to the server may take.                                                    |
| `startup`                 | string   | The transport: `stdio`, or a remote one.                                                     |
| `connect_timeout_seconds` | integer  | How long a connect may take.                                                                 |
| `auth`                    | object   | The credentials a remote server needs.                                                       |
| `auth_timeout_seconds`    | integer  | How long an authentication handshake may take.                                               |
| `optional`                | boolean  | Whether a failing server leaves the run going.                                               |
| `$schema`                 | string   | The document version this file claims; another version is a warning, and publish refuses it. |

## photo-config keys

Version 1.0. Every key the document defines, in its order.

| Member             | Type    | Notes                                                                                        |
| ------------------ | ------- | -------------------------------------------------------------------------------------------- |
| `model`            | string  | The model that answers; the matching CLI flag overrides it.                                  |
| `model-aliases`    | object  | Model verbs, each resolved to this machine's ordered model list.                             |
| `prompt-format`    | string  | The prompt template the mode fills in.                                                       |
| `output`           | object  | The output directory and the filename prefix.                                                |
| `raw`              | boolean | Whether the answer prints unrendered.                                                        |
| `auto-open-images` | boolean | Whether a generated image opens when it arrives.                                             |
| `image-opener`     | string  | The command that opens an image.                                                             |
| `$schema`          | string  | The document version this file claims; another version is a warning, and publish refuses it. |

## profile keys

Version 1.0. Every key the document defines, in its order.

| Member               | Type     | Notes                                                                                                         |
| -------------------- | -------- | ------------------------------------------------------------------------------------------------------------- |
| `name`               | string   | A label: `-p <name>` finds `profiles/<name>.json`.                                                            |
| `model`              | string   | The model that answers; the matching CLI flag overrides it.                                                   |
| `use_tools`          | boolean  | Whether the agent may call tools at all.                                                                      |
| `use_skills`         | boolean  | Whether skills are on for this profile.                                                                       |
| `tools`              | string[] | The tool allowlist, globs included.                                                                           |
| `skills`             | string[] | Skill targets, fetched and trusted with the profile.                                                          |
| `cmd-ban`            | string[] | Commands the agent's shell refuses.                                                                           |
| `prompt`             | string   | The system prompt.                                                                                            |
| `save-reply-as-conv` | boolean  | Whether the run becomes the conversation `-re` replies to.                                                    |
| `mcp_servers`        | object   | MCP servers by name.                                                                                          |
| `shell_context`      | string   | A shell context from the config dir; publish refuses the member, because a shell context is the runner's own. |
| `use_lookback`       | boolean  | Whether the run may look back at earlier conversations.                                                       |
| `audio`              | object   | The audio model this profile's `audio_transcribe` calls use.                                                  |
| `source`             | object   | The stamp an installed profile carries: the remote target the file came from.                                 |
| `description`        | string   | clai never reads it: the checker warns and accepts it.                                                        |
| `$schema`            | string   | The document version this file claims; another version is a warning, and publish refuses it.                  |

## shell-contexts keys

Version 1.0. Every key the document defines, in its order.

| Member            | Type    | Notes                                                                                        |
| ----------------- | ------- | -------------------------------------------------------------------------------------------- |
| `shell`           | string  | The shell program the context runs in.                                                       |
| `timeout_ms`      | integer | How long one evaluation may take.                                                            |
| `timed_out_value` | string  | The value a timed-out evaluation yields.                                                     |
| `error_value`     | string  | The value a failed evaluation yields.                                                        |
| `template`        | string  | The text the context emits, with its `{{vars}}` filled.                                      |
| `vars`            | object  | The named expressions the template fills.                                                    |
| `$schema`         | string  | The document version this file claims; another version is a warning, and publish refuses it. |

## skills-json keys

Version 1.0. Every key the document defines, in its order.

| Member               | Type     | Notes                                                                                        |
| -------------------- | -------- | -------------------------------------------------------------------------------------------- |
| `enabled`            | boolean  | Whether skills are on for every run.                                                         |
| `globalSkillDirs`    | string[] | The directories every project loads skills from.                                             |
| `projectSkillDirs`   | string[] | The directories a project loads skills from.                                                 |
| `trust_all_skills`   | boolean  | Whether a skill activates without a prompt.                                                  |
| `maxActivatedSkills` | integer  | The cap on skills active in one run.                                                         |
| `$schema`            | string   | The document version this file claims; another version is a warning, and publish refuses it. |

## text-config keys

Version 1.0. Every key the document defines, in its order.

| Member                    | Type     | Notes                                                                                        |
| ------------------------- | -------- | -------------------------------------------------------------------------------------------- |
| `model`                   | string   | The model that answers; the matching CLI flag overrides it.                                  |
| `model-aliases`           | object   | Model verbs, each resolved to this machine's ordered model list.                             |
| `system-prompt`           | string   | The system prompt of a plain query.                                                          |
| `raw`                     | boolean  | Whether the answer prints unrendered.                                                        |
| `use-tools`               | boolean  | Whether tools are on by default.                                                             |
| `cmd-mode-prompt`         | string   | The system prompt a `cmd` mode run prepends.                                                 |
| `tool-output-rune-limit`  | integer  | How much of one tool's output reaches the model.                                             |
| `save-reply-as-prompt`    | boolean  | Whether the run becomes the prompt `-re` replies to.                                         |
| `cmd-ban`                 | string[] | Commands the agent's shell refuses.                                                          |
| `summarize-conversations` | boolean  | Whether a new conversation gets a title and a summary.                                       |
| `summary-model`           | string   | The model that writes the summary.                                                           |
| `query-summary`           | boolean  | Whether a run prints its token, cost and tool summary.                                       |
| `use_lookback`            | boolean  | Whether the run may look back at earlier conversations.                                      |
| `max-tool-calls`          | integer  | The cap on tool calls in one run.                                                            |
| `stoploss`                | object   | The token and tool-call stop-loss policy.                                                    |
| `$schema`                 | string   | The document version this file claims; another version is a warning, and publish refuses it. |

## theme keys

Version 1.0. Every key the document defines, in its order.

| Member             | Type    | Notes                                                                                        |
| ------------------ | ------- | -------------------------------------------------------------------------------------------- |
| `primary`          | string  | The main accent colour.                                                                      |
| `secondary`        | string  | The second accent colour.                                                                    |
| `breadtext`        | string  | The body text colour.                                                                        |
| `roleSystem`       | string  | The colour of the system role's lines.                                                       |
| `roleUser`         | string  | The colour of the user role's lines.                                                         |
| `roleTool`         | string  | The colour of the tool role's lines.                                                         |
| `roleReasoning`    | string  | The colour of the reasoning lines.                                                           |
| `roleOther`        | string  | The colour of every other role's lines.                                                      |
| `notificationBell` | boolean | Whether the terminal bell rings when an answer ends.                                         |
| `tableItems`       | integer | How many rows a table shows at once.                                                         |
| `toolOutputRows`   | integer | How many rows of tool output the transcript keeps.                                           |
| `rollingOutput`    | object  | The rolling-output window.                                                                   |
| `loopTitle`        | string  | The title a loop run shows.                                                                  |
| `$schema`          | string  | The document version this file claims; another version is a warning, and publish refuses it. |

## video-config keys

Version 1.0. Every key the document defines, in its order.

| Member          | Type    | Notes                                                                                        |
| --------------- | ------- | -------------------------------------------------------------------------------------------- |
| `model`         | string  | The model that answers; the matching CLI flag overrides it.                                  |
| `prompt-format` | string  | The prompt template the mode fills in.                                                       |
| `output`        | object  | The output directory and the filename prefix.                                                |
| `raw`           | boolean | Whether the answer prints unrendered.                                                        |
| `$schema`       | string  | The document version this file claims; another version is a warning, and publish refuses it. |

## Checking a file

A finding names the JSON path it is about, such as `model` or
`model-aliases.strong`, and one line of reason. An error refuses the file when
the server saves it from the editor; a warning is reported and the file is
stored. The editor on the account's config pages shows the same findings while
you type, and `clai config validate` prints them on a terminal.

## Related

- [The config editor](/docs/guides/config-editor/) for the store, the editor
  and publishing.
- [Profiles and setup](/docs/guides/profiles/) for the profile document in
  context.
- [Configuration](/docs/reference/configuration/) for the files themselves.
