Skip to content

design.tokens

Every token of the design, explained: roles with their light and dark values, statuses with their text, ground and border and the state words filed under them, the type scale, the layout values, the theme contract, the palette. Narrow it to one kind.

Every token of the design, explained: roles with their light and dark values, statuses with their text, ground and border and the state words filed under them, the type scale, the layout values, the theme contract, the palette. Narrow it to one kind.

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

Exposure

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

surfaceas
MCPtool majordomus_design_tokens
HTTPGET /api/v1/design/tokens operationId design.tokens
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 · TokensInput

The input of `design.tokens`: every token, or one kind of them.

propertytyperequireddescription
kind one of 2 no Only tokens of this kind.
JSON Schema
{
  "$defs": {
    "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"
        }
      ]
    }
  },
  "additionalProperties": false,
  "description": "The input of `design.tokens`: every token, or one kind of them.",
  "properties": {
    "kind": {
      "anyOf": [
        {
          "$ref": "#/$defs/TokenKind"
        },
        {
          "type": "null"
        }
      ],
      "description": "Only tokens of this kind."
    }
  },
  "title": "TokensInput",
  "type": "object"
}

output · TokenList

The tokens, listed.

propertytyperequireddescription
fingerprint string yes The fingerprint of the declaration they came from.
tokens array yes The tokens, in the inventory's order.
total integer yes How many are listed.
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"
    },
    "Token": {
      "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"
      ],
      "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": "The tokens, listed.",
  "properties": {
    "fingerprint": {
      "description": "The fingerprint of the declaration they came from.",
      "type": "string"
    },
    "tokens": {
      "description": "The tokens, in the inventory's order.",
      "items": {
        "$ref": "#/$defs/Token"
      },
      "type": "array"
    },
    "total": {
      "description": "How many are listed.",
      "format": "uint",
      "minimum": 0,
      "type": "integer"
    }
  },
  "required": [
    "fingerprint",
    "total",
    "tokens"
  ],
  "title": "TokenList",
  "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
directcovered2all
roles
mcpcovered2all
roles
httpcovered2all
roles