A snapshot: read at commit 707a04c7ce8 on 2026-10-18T00:06:01Z by majordomus 0.29.0. Nothing on this page is read again. See it live
design.tokens
The design tokens
What it is
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.
Descriptor
- Canonical id
design.tokens- Module
design- Kind
- query
- Stability
- behaviorallyverified
- Provenance
- declared
- Source
apps/majordomus-cli/src/capability/builtin/design.rs- Cache
disabled- Benchmark
required- Tags
- designuiintrospection
Run
queryA query. It reads and changes nothing.
Projections
| Interface | As | Where |
|---|---|---|
| MCP tool | majordomus_design_tokens | - |
| MCP resource | not exposed | - |
| HTTP | GET /api/v1/design/tokens | Swagger |
| Command line | not exposed | - |
Schemas
Input · TokensInput
{
"type": "object",
"additionalProperties": false,
"properties": {
"kind": {
"anyOf": [
{
"$ref": "#/$defs/TokenKind"
},
{
"type": "null"
}
],
"description": "Only tokens of this kind."
}
},
"description": "The input of `design.tokens`: every token, or one kind of them.",
"title": "TokensInput",
"$defs": {
"TokenKind": {
"oneOf": [
{
"type": "string",
"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": "tone",
"description": "A tone: a hue for identity, never for meaning."
},
{
"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."
}
],
"description": "What kind of thing a token is."
}
}
}Output · TokenList
{
"type": "object",
"properties": {
"fingerprint": {
"type": "string",
"description": "The fingerprint of the declaration they came from."
},
"total": {
"type": "integer",
"format": "uint",
"minimum": 0,
"description": "How many are listed."
},
"tokens": {
"type": "array",
"items": {
"$ref": "#/$defs/Token"
},
"description": "The tokens, in the inventory's order."
}
},
"required": [
"fingerprint",
"total",
"tokens"
],
"description": "The tokens, listed.",
"title": "TokenList",
"$defs": {
"Token": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name as declared."
},
"kind": {
"$ref": "#/$defs/TokenKind",
"description": "What kind of token."
},
"about": {
"type": "string",
"description": "What it is for, from the declaration."
},
"css": {
"type": "array",
"items": {
"type": "string"
},
"description": "The custom properties and Tailwind utilities it becomes."
},
"parts": {
"type": "array",
"items": {
"$ref": "#/$defs/ColourPart"
},
"description": "For a colour token: its parts, each resolved per theme."
},
"value": {
"type": [
"string",
"null"
],
"description": "For a scalar token: the value."
},
"role": {
"type": [
"string",
"null"
],
"description": "For a state word: the status it is filed under."
},
"states": {
"type": "array",
"items": {
"type": "string"
},
"description": "For a status: the state words filed under it."
},
"aliases": {
"type": "array",
"items": {
"type": "string"
},
"description": "The Flowbite names that are synonyms of it."
},
"projections": {
"type": "array",
"items": {
"type": "string"
},
"description": "The generated files the token reaches."
}
},
"required": [
"name",
"kind",
"about",
"css",
"projections"
],
"description": "One token, explained: where it came from, what it resolves to, what reads it."
},
"TokenKind": {
"oneOf": [
{
"type": "string",
"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": "tone",
"description": "A tone: a hue for identity, never for meaning."
},
{
"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."
}
],
"description": "What kind of thing a token is."
},
"ColourPart": {
"type": "object",
"properties": {
"part": {
"type": "string",
"description": "`fg`, `bg` or `line`."
},
"css": {
"type": "string",
"description": "The custom property a surface reads."
},
"light": {
"$ref": "#/$defs/Resolved",
"description": "In the light theme."
},
"dark": {
"$ref": "#/$defs/Resolved",
"description": "In the dark theme."
}
},
"required": [
"part",
"css",
"light",
"dark"
],
"description": "One part of a colour token — a role has one, a status has its text, ground and border."
},
"Resolved": {
"type": "object",
"properties": {
"reference": {
"type": "string",
"description": "The palette entry or role the declaration named."
},
"css": {
"type": "string",
"description": "The CSS value a stylesheet gets: the literal of a palette entry, or `var(--mj-<role>)`."
},
"literal": {
"type": "string",
"description": "The literal after every reference is followed."
}
},
"required": [
"reference",
"css",
"literal"
],
"description": "What a colour reference resolved to."
}
}
}Examples
These are the capability's own benchmark cases: the same inputs the benchmark runs and the OpenAPI document shows.
all
{}roles
{
"kind": "role"
}