Use it when adding a brand; use brand_apply to edit an existing brand or tokens_build to compile current sources. Returns templates, validation reports, recipes with provenance/gaps, or created brands and build results. action selects template, validate, derive, create, draft, show or apply. draft reads a local DTCG file with token names and light/dark modes; show reviews slot evidence and fallbacks; apply with draftId and accept:true validates and creates the reviewed brand. derive accepts exactly one of tokens, css or cssPath; review gaps before creating. create validates every theme, refuses replacement, writes into your brands folder and builds tokens. Template and validation calls write nothing. Reference: TOOL-REFERENCE.md#brand_create; full schema: oods://schemas/brand_create.input.json.

Inputs

Name Type Required Description
action "derive" | "template" | "validate" | "create" | "draft" | "show" | "apply" yes 'derive' reads your own tokens or shadcn theme CSS into a partial recipe with provenance and gaps, writing nothing; 'template' returns the documents to fill: every slot of the light (base), dark and high-contrast (hc)… See full schema for details.
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, draft.
brand_id string no The id the brand will have. Actions: validate, create (required), draft (required). See full schema for details.
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, create.
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, create.
source object no Actions: draft (required).
bindings object no Actions: draft.
draftId string no Actions: show (required), apply (required).
accept true no Actions: apply (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.10.1.

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