Use it when adding a brand; use brand_read for templates, validation, derivation and draft review, or brand_apply to edit a brand. Returns a staged draft or created brand with build results. apply needs draftId and accept:true. create accepts filled documents or a recipe, validates all themes, refuses replacement and removes a brand whose build fails. Full schema: oods://schemas/brand_create.input.json.

Inputs

Name Type Required Description
action "create" | "draft" | "apply" yes Choose create, draft, apply.
brand_id string no The id the brand will have. Actions: 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: 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: create.
source object no Actions: draft (required).
bindings object no Actions: draft.
from object no Actions: draft.
draftId string no Actions: 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 brand-create, with the published OODS Foundry 0.19.0.

Its input, first lines:

{
  "action": "create",
  "brand_id": "Harbor",
  "documents": {
    "base": {
      "surface": {
        "canvas": {
          "$type": "color",
          "$value": "oklch(1 0.000007 205)",
          "$description": "Primary application canvas."
        },
        "raised": {
          "$type": "color",
          "$value": "oklch(1 0.000007 205)",
          "$description": "Raised card surface."
        },
        "subtle": {
          "$type": "color",
          "$value": "oklch(0.97 0.00288 205)",
          "$description": "Subtle secondary surface."
        },
        "disabled": {
          "$type": "color",
          "$value": "oklch(0.97 0.00288 205)",
          "$description": "Surface colour for disabled or inactive UI."
        },
        "backdrop": {
          "$type": "color",
          "$value": "oklch(0.145 0.00708 205)",
          "$description": "Backdrop scrim surface."
        },
        "inverse": {
          "$type": "color",
          "$value": "oklch(0.145 0.00708 205)",
          "$description": "Inverse surface for dark-on-light treatments."
        },
        "interactive": {
          "primary": {
            "default": {
              "$type": "color",
              "$value": "oklch(0.555682 0.098165 215)",
              "$description": "Primary interactive surface default state."
            },
            "hover": {
              "$type": "color",
              "$value": "oklch(0.525682 0.092719 214.68812)",
              "$description": "Primary interactive surface hover state."
            },
            "pressed": {
              "$type": "color",
              "$value": "oklch(0.495682 0.087428 214.68812)",
              "$description": "Primary interactive surface pressed state."
            }
          },
          "secondary": {
            "default": {
              "$type": "color",
              "$value": "oklch(0.97 0.00288 205)",
              "$description": "The secondary action (a subtle fill), at rest."
            },

Its result, first lines:

{
  "action": "create",
  "created": true,
  "brand_id": "Harbor",
  "folder": "~/.oods-foundry/brands",
  "files": [
    {
      "theme": "base",
      "path": "Harbor/base.json",
      "sha256": "6329c87d35e6c904f5e8ccbb2263f99692d342f5e365809d2c2ec6c4e6d52098",
      "bytes": 32560
    },
    {
      "theme": "dark",
      "path": "Harbor/dark.json",
      "sha256": "48c04ed5057d160d08cce1009ef5da88ea2f60695a591d5c87e095f29d73e512",
      "bytes": 31004
    },
    {
      "theme": "hc",
      "path": "Harbor/hc.json",
      "sha256": "d1dc4d90fb2551a516e32188e33c9d06f0eb7456a43ef2289ebcd1165d0b24fb",
      "bytes": 19760
    }
  ],
  "build": {
    "exitCode": 0,
    "durationMs": 2086
  },
  "brands": [
    "A",
    "B",
    "Harbor"
  ],
  "report": {
    "valid": true,
    "brand_id": "Harbor",
    "themes": {
      "base": {
        "label": "light",
        "slots": 103,
        "provided": 103
      },
      "dark": {
        "label": "dark",
        "slots": 96,
        "provided": 96
      },
      "hc": {
        "label": "high contrast",
        "slots": 96,
        "provided": 96
      }
    },
    "issues": [],
    "contrast": {
      "base": {
        "graded": 84,
        "passed": 84,
        "failed": 0,

The whole call, 61 KB of JSON