Skip to content

design.explain

One token by name or by the custom property it becomes: what it is for, what it resolves to in each theme, which Flowbite names are synonyms of it, which state words it colours, and which generated files it reaches.

One token by name or by the custom property it becomes: what it is for, what it resolves to in each theme, which Flowbite names are synonyms of it, which state words it colours, and which generated files it reaches.

  • query
  • behaviorally_verified
  • module design
  • #design
  • #ui
  • #provenance
  • #introspection

Exposure

Where this one definition is reachable. Absence is explicit: a surface not listed does not carry it.

surfaceas
MCPtool majordomus_design_explain
HTTPGET /api/v1/design/explain operationId design.explain
command line

Schemas

The canonical input and output, from the Rust types; the MCP tool schema and the OpenAPI parameters and responses are derived from these.

input · ExplainTokenInput

The input of `design.explain`: one token by name.

propertytyperequireddescription
token string yes A role (`fg`), a status (`ok`), a state word (`succeeded`), a type step (`meta`), a palette entry (`gray-600`), or the custom property any of them becomes (`--mj-fg`).
JSON Schema
{
  "additionalProperties": false,
  "description": "The input of `design.explain`: one token by name.",
  "properties": {
    "token": {
      "description": "A role (`fg`), a status (`ok`), a state word (`succeeded`), a type step (`meta`), a\npalette entry (`gray-600`), or the custom property any of them becomes (`--mj-fg`).",
      "type": "string"
    }
  },
  "required": [
    "token"
  ],
  "title": "ExplainTokenInput",
  "type": "object"
}

output · Token

One token, explained: where it came from, what it resolves to, what reads it.

propertytyperequireddescription
about string yes What it is for, from the declaration.
aliases array no The Flowbite names that are synonyms of it.
css array yes The custom properties and Tailwind utilities it becomes.
kind reference yes What kind of token.
name string yes The name as declared.
parts array no For a colour token: its parts, each resolved per theme.
projections array yes The generated files the token reaches.
role string | null no For a state word: the status it is filed under.
states array no For a status: the state words filed under it.
value string | null no For a scalar token: the value.
JSON Schema
{
  "$defs": {
    "ColourPart": {
      "description": "One part of a colour token — a role has one, a status has its text, ground and border.",
      "properties": {
        "css": {
          "description": "The custom property a surface reads.",
          "type": "string"
        },
        "dark": {
          "$ref": "#/$defs/Resolved",
          "description": "In the dark theme."
        },
        "light": {
          "$ref": "#/$defs/Resolved",
          "description": "In the light theme."
        },
        "part": {
          "description": "`fg`, `bg` or `line`.",
          "type": "string"
        }
      },
      "required": [
        "part",
        "css",
        "light",
        "dark"
      ],
      "type": "object"
    },
    "Resolved": {
      "description": "What a colour reference resolved to.",
      "properties": {
        "css": {
          "description": "The CSS value a stylesheet gets: the literal of a palette entry, or `var(--mj-<role>)`.",
          "type": "string"
        },
        "literal": {
          "description": "The literal after every reference is followed.",
          "type": "string"
        },
        "reference": {
          "description": "The palette entry or role the declaration named.",
          "type": "string"
        }
      },
      "required": [
        "reference",
        "css",
        "literal"
      ],
      "type": "object"
    },
    "TokenKind": {
      "description": "What kind of thing a token is.",
      "oneOf": [
        {
          "const": "font",
          "description": "A type stack.",
          "type": "string"
        },
        {
          "const": "palette",
          "description": "A raw palette entry.",
          "type": "string"
        },
        {
          "const": "role",
          "description": "A semantic surface role.",
          "type": "string"
        },
        {
          "const": "status",
          "description": "A status meaning.",
          "type": "string"
        },
        {
          "const": "state",
          "description": "A state word, filed under a status.",
          "type": "string"
        },
        {
          "const": "type",
          "description": "A step of the type scale.",
          "type": "string"
        },
        {
          "const": "tracking",
          "description": "A letter-spacing.",
          "type": "string"
        },
        {
          "const": "layout",
          "description": "A shared layout value.",
          "type": "string"
        },
        {
          "const": "radius",
          "description": "A corner radius.",
          "type": "string"
        },
        {
          "const": "motion",
          "description": "A duration.",
          "type": "string"
        },
        {
          "const": "theme",
          "description": "The theme contract.",
          "type": "string"
        }
      ]
    }
  },
  "description": "One token, explained: where it came from, what it resolves to, what reads it.",
  "properties": {
    "about": {
      "description": "What it is for, from the declaration.",
      "type": "string"
    },
    "aliases": {
      "description": "The Flowbite names that are synonyms of it.",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "css": {
      "description": "The custom properties and Tailwind utilities it becomes.",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "kind": {
      "$ref": "#/$defs/TokenKind",
      "description": "What kind of token."
    },
    "name": {
      "description": "The name as declared.",
      "type": "string"
    },
    "parts": {
      "description": "For a colour token: its parts, each resolved per theme.",
      "items": {
        "$ref": "#/$defs/ColourPart"
      },
      "type": "array"
    },
    "projections": {
      "description": "The generated files the token reaches.",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "role": {
      "description": "For a state word: the status it is filed under.",
      "type": [
        "string",
        "null"
      ]
    },
    "states": {
      "description": "For a status: the state words filed under it.",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "value": {
      "description": "For a scalar token: the value.",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "name",
    "kind",
    "about",
    "css",
    "projections"
  ],
  "title": "Token",
  "type": "object"
}

Policies

benchmark
required — a target on every transport the exposure declares; the cases are the input type's
cache
disabled — every call runs the handler

Benchmark targets

Derived from the registry for this repository: one requirement per transport, and the cases the input type provides. The whole matrix is on the benchmarks page.

transportstatecasestargets
directcovered2role
state
mcpcovered2role
state
httpcovered2role
state