[Tools](https://oods-foundry.com/tools) / brand_read

# `brand_read`

Read brand templates, validate documents, derive recipes or inspect staged drafts.

Generated from @oods/foundry 0.11.0

One of the 26 tools your assistant sees by default.

Use it when preparing a brand without saving; use brand_create to stage or create it. Returns complete template slots, validation findings, a recipe with provenance and gaps, or draft evidence. derive takes exactly one of tokens, css or absolute cssPath. Template replies use compact JSON so all themes fit inline. Full schema: oods\://schemas/brand_read.input.json.

## Inputs

| Name | Type | Required | Description |
| - | - | - | - |
| `action` | `"template" \| "validate" \| "derive" \| "show"` | yes | Choose template, validate, derive, show. |
| `tokens` | `object` | no | A DTCG document with your own token names. Group $type is inherited; {group.token} aliases resolve inside the document. Actions: derive. |
| `css` | `string` | no | A shadcn theme CSS entry, in place of tokens. Actions: derive. See full schema for details. |
| `cssPath` | `string` | no | Absolute path to the shadcn theme CSS entry, in place of tokens or css. Read only. Actions: derive. |
| `hints` | `object` | no | Exact dot-separated token paths, or CSS custom property names, that override inference. Invalid hints produce gaps, never silent fallback. Actions: derive. |
| `from` | `object` | no | Where the starting values come from: an existing brand (default A), optionally with one of the shipped presets over it; or a recipe, which gives the complete brand, graded. Actions: template. |
| `brand_id` | `string` | no | The id the brand will have. Checked when given: capitals then digits (ACME, A1) or a letter then lower-case letters and digits (Acme, acme2), at most 32 characters, and no existing brand's id in any case. Actions: validate. |
| `documents` | `object` | no | The filled template: one plain design-token document per theme, brand-relative (surface.canvas, not color.brand.\<id>.surface.canvas), each slot {"$type": "color", "$value": "\<CSS colour>"}. Actions: validate. |
| `recipe` | `object` | no | A brand recipe in place of documents: the brand it gives is checked, and for create written, like filled documents. Actions: validate. |
| `draftId` | `string` | no | Actions: show (required). |

## Outputs

The package ships no output schema for this tool.

## A real call

Recorded by this site's `harbor` run, step `template`, with the published OODS Foundry 0.11.0.

Its input:

```
{
  "action": "template"
}
```

Its result, first lines:

```
{
  "action": "template",
  "from": {
    "brand": "A"
  },
  "slots": {
    "base": 103,
    "dark": 96,
    "hc": 96
  },
  "documents": {
    "base": {
      "surface": {
        "canvas": {
          "$type": "color",
          "$value": "oklch(1 0 286)",
          "$description": "Primary application canvas."
        },
        "raised": {
          "$type": "color",
          "$value": "oklch(1 0 286)",
          "$description": "Raised card surface."
        },
        "subtle": {
          "$type": "color",
          "$value": "oklch(0.97 0 286)",
          "$description": "Subtle secondary surface."
        },
        "disabled": {
          "$type": "color",
          "$value": "oklch(0.97 0 286)",
          "$description": "Surface colour for disabled or inactive UI."
        },
        "backdrop": {
          "$type": "color",
          "$value": "oklch(0.145 0 286)",
          "$description": "Backdrop scrim surface."
        },
        "inverse": {
          "$type": "color",
          "$value": "oklch(0.145 0 286)",
          "$description": "Inverse surface for dark-on-light treatments."
        },
        "interactive": {
          "primary": {
            "default": {
              "$type": "color",
              "$value": "oklch(0.145 0 286)",
              "$description": "Primary interactive surface default state."
            },
            "hover": {
              "$type": "color",
              "$value": "oklch(0.3361 0 286)",
              "$description": "Primary interactive surface hover state."
            },
            "pressed": {
              "$type": "color",
              "$value": "oklch(0.2626 0 286)",
              "$description": "Primary interactive surface pressed state."
            }
```

[The whole call, 62 KB of JSON](https://oods-foundry.com/tools/brand-read/call.json)
