design-data-agent-mcp
v1.17.0MCP server and Claude Code skill for the design-data agent surface — read tools run in-process via wasm
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
primer
Load the design data primer: full token taxonomy, resolved values, component list, and field definitions. Call this at the start of an agent session.
resolve_token
Resolve a design token property to its final value for a given context. Use component, variant, state, or colorRole to disambiguate shared properties; inspect ambiguous and deprecated in the result.
| Parameter | Type | Description |
|---|---|---|
property * | string | Bare token property name (the name.property segment, e.g. "background-color", "corner-radius" — see primer().properties for the full list). Not a flattened legacyKey. |
colorRole | string | Optional color role such as accent, negative, or positive. |
colorScheme | string | Color scheme: light or dark |
component | string | Optional component name-object field. It is sparsely populated; prefer variant, state, or colorRole when available. |
contrast | string | Contrast: regular or high |
excludeDeprecated | boolean | Exclude tokens with lifecycle.deprecatedIn from candidate resolution. |
scale | string | Scale: desktop or mobile |
state | string | Optional token state used to narrow shared properties (including array-valued state). |
variant | string | Optional token variant used to narrow shared properties. |
query_tokens
Query design tokens using a filter expression. Returns matching token entries; alias tokens add `value` (the token's own resolved value in its own mode), and `chain` with view=full.
| Parameter | Type | Description |
|---|---|---|
filter * | string | Filter expression, e.g. "property=background-color". Valid keys: property, component, variant, state, colorScheme, scale, contrast, uuid, $schema, tier (primitive, semantic or component), object, anat… |
view | string | compact (default) adds an alias token's own resolved value (in its own mode; default modes where it is multi-mode); full also adds the alias `chain`. Composite values are not shown. |
suggest_token
Suggest Spectrum tokens matching a natural-language intent using Jaccard similarity scoring over token name segments, name-object fields, and description text. Returns matches ranked by confidence with token name, layer, value, and name object. Use when the user describes what they need rather than knowing the token name.
| Parameter | Type | Description |
|---|---|---|
intent * | string | Natural-language description of the design need, e.g. "primary CTA button background color" |
limit | number | Maximum number of suggestions to return (default: 5) |
view | string | compact (default) adds an alias token's own resolved value (in its own mode; default modes where it is multi-mode); full also adds the alias `chain`. Composite values are not shown. |
token_refinements
Show a token's semantic specificity (tier, then purpose-field count, derived from its name) and the same-property tokens that are narrower (add purpose fields) or broader (drop them). Each neighbor lists `fields` it adds or lacks and a `valueMatch`: "drop-in" (same value in every mode) or "consider" (differs; see `differingModes`). Specificity only orders tokens; check the added fields fit the use before swapping.
| Parameter | Type | Description |
|---|---|---|
token * | string | Token name (e.g. neutral-content-color-hover), uuid or conceptId. The older field text, such as `property=corner-radius scaleIndex=500`, is also accepted. |
limit | number | Maximum narrower and broader tokens, each (default: 10) |
describe_component
Return the JSON schema and token relationships (bindings) for a design system component by its ID.
| Parameter | Type | Description |
|---|---|---|
id * | string | Component ID, e.g. button |
describe_guideline
Return the full documentBlocks content and metadata for a Spectrum design guideline by its slug ID — the read-back counterpart to data_create/data_edit for the guidelines category. Guideline IDs are kebab-case, e.g. colors, motion, typography-fundamentals.
| Parameter | Type | Description |
|---|---|---|
id * | string | Guideline ID (kebab-case slug), e.g. colors, motion |
list_guidelines
List available Spectrum design guidelines and their metadata. Optionally filter the catalog by category before calling describe_guideline.
| Parameter | Type | Description |
|---|---|---|
category | string | Optional guideline category, e.g. designing or implementing |
validate_usage
Validate design token usage in a dataset. Runs Layer-1 JSON-Schema structural validation and Layer-2 relational rules. Returns a JSON report of violations and warnings.
| Parameter | Type | Description |
|---|---|---|
path | string | Path to dataset to validate (defaults to DESIGN_DATA_PATH) |
schema_path | string | Path to schemas directory containing token-types/ and token-file.json. Defaults to the @adobe/design-data-spec schemas. Set DESIGN_DATA_SCHEMAS env var or pass explicitly for custom schema sets. |
strict | boolean | Treat warnings as errors |
diff_datasets
Compare two design data datasets and return a JSON diff of added, removed, and changed tokens.
| Parameter | Type | Description |
|---|---|---|
newPath * | string | Path to the new/updated dataset |
oldPath * | string | Path to the old/baseline dataset |
filter | string | Optional filter expression to narrow results |
write
Write agent-generated design context to the dataset (e.g. product-context.json). Returns a confirmation message.
| Parameter | Type | Description |
|---|---|---|
output | string | Output file path (defaults to product-context.json inside DESIGN_DATA_PATH) |
rationale | string | Rationale or summary to embed in the written file |
start_authoring_session
Start a new token authoring session. Returns a session_id and the initial wizard state. The session persists across calls — use the returned session_id in subsequent steps.
| Parameter | Type | Description |
|---|---|---|
dataset_path | string | Path to the token dataset directory. Defaults to DESIGN_DATA_PATH. |
authoring_session_step_intent
Update the intent for a session and get ranked existing-token suggestions. Returns suggestions and can_alias (true when a high-confidence match exists).
| Parameter | Type | Description |
|---|---|---|
intent * | string | Natural-language description of what the token is for, e.g. 'accent background color'. |
session_id * | string |
authoring_session_step_classification
Set the layer, property, and name-object fields for the token. name_fields is an array of {key, value} objects. Classification is validated against the active fields catalog.
| Parameter | Type | Description |
|---|---|---|
layer * | string | Token layer. |
property * | string | Token property, e.g. 'background-color'. |
session_id * | string | |
name_fields | array | Additional name-object fields beyond property. |
authoring_session_step_values
Set the value rows for the token. Each row specifies mode conditions and either a literal value or an alias target. Most tokens need one row with empty mode_combo.
| Parameter | Type | Description |
|---|---|---|
rows * | array | Value rows. Each: { mode_combo: [[key,val],...], kind: 'Literal'|'Alias', alias_target: string, literal: string } |
session_id * | string |
authoring_session_commit
Build and write the token to disk as a cascade array element, then remove the session. Requires schema_url (the JSON Schema URL for the token type) and target (the *.tokens.json cascade file to write into).
| Parameter | Type | Description |
|---|---|---|
schema_url * | string | The $schema URL for the token type, e.g. https://opensource.adobe.com/spectrum-design-data/schemas/token-types/color.json |
session_id * | string | |
target * | string | Target *.tokens.json cascade file to write into (created if absent, upserted if present). |
is_override | boolean | True when this token overrides an existing foundation/platform token. |
product_context | string | Path to product-context.json for rationale capture. |
rationale | string | Why this token is being created. |
schema_path | string | Path to schemas directory containing token-types/ and token-file.json. Defaults to the @adobe/design-data-spec schemas when omitted. |
authoring_session_cancel
Cancel a session and delete its on-disk file.
| Parameter | Type | Description |
|---|---|---|
session_id * | string |
authoring_session_get
Get the current state of an authoring session.
| Parameter | Type | Description |
|---|---|---|
session_id * | string |
authoring_session_list
List all active authoring sessions.
edit_token
Merge field updates into an already-committed cascade token, then re-validate. The token's uuid is always preserved and silently ignored if included in updates.
| Parameter | Type | Description |
|---|---|---|
target * | string | Path to the *.tokens.json cascade file containing the token. |
updates * | object | Fields to merge into the token object, e.g. { "value": "#ff0000" }. |
uuid * | string | UUID of the token to edit. |
rationale | string | Why the token changed. |
schema_path | string | Schemas directory for validation (default: auto-resolved from target). |
tokens_root | string | Root tokens directory — required when updates contains a $ref. |
deprecate_token
Stamp a deprecation marker onto a cascade token. Optionally record a replacement UUID and a planned-removal spec version.
| Parameter | Type | Description |
|---|---|---|
spec_version * | string | Dataset specVersion string to stamp into the deprecated value, e.g. '1.0.0'. |
target * | string | Path to the *.tokens.json cascade file containing the token. |
uuid * | string | UUID of the token to deprecate. |
deprecated_comment | string | Human-readable deprecation explanation / migration guidance. |
planned_removal | string | Spec version at which the token will be removed. |
rationale | string | Why the token was deprecated. |
replaced_by | string | Replacement token UUID (string) or JSON array of UUIDs. |
schema_path | string | Schemas directory for validation. |
rename_token
Assign a new name object to a cascade token, preserving its UUID. Optionally set a replaced_by pointer on the token being renamed.
| Parameter | Type | Description |
|---|---|---|
new_name * | New name — either a JSON object ({"property":"…","component":"…"}) or a plain string. | |
target * | string | Path to the *.tokens.json cascade file containing the token. |
uuid * | string | UUID of the token to rename. |
rationale | string | Why the token was renamed. |
replaced_by_target | string | UUID to set as the replaced_by pointer (for retiring the old name). |
schema_path | string | Schemas directory for validation. |
rewire_alias
Change the $ref target on an alias token. The new ref target must resolve in the cascade. Rejects if the token is not an alias.
| Parameter | Type | Description |
|---|---|---|
new_ref * | string | New $ref value — must be a UUID that resolves in the cascade. |
target * | string | Path to the *.tokens.json cascade file containing the token. |
tokens_root * | string | Root tokens directory for ref-resolution verification. |
uuid * | string | UUID of the alias token to rewire. |
rationale | string | Why the alias target changed. |
schema_path | string | Schemas directory for validation. |
remove_token
Delete a token from a cascade file. Aborts if any other token in the dataset holds a $ref pointing at this token's UUID.
| Parameter | Type | Description |
|---|---|---|
target * | string | Path to the *.tokens.json cascade file containing the token. |
tokens_root * | string | Root tokens directory for inbound-reference guard. |
uuid * | string | UUID of the token to remove. |
add_mode
Append a new mode to an existing mode-set file.
| Parameter | Type | Description |
|---|---|---|
mode * | string | Name of the new mode to add. |
mode_set_file * | string | Path to the mode-set JSON file. |
make_default | boolean | Make this the default mode. |
rename_mode
Rename a mode in a mode-set file and propagate the change to all token files under tokens_root that use that mode value.
| Parameter | Type | Description |
|---|---|---|
mode_set_file * | string | Path to the mode-set JSON file. |
new * | string | Replacement mode name. |
old * | string | Existing mode name to rename. |
tokens_root * | string | Root tokens directory for propagation. |
remove_mode
Remove a mode from a mode-set file. Aborts if any token references that mode value or if the mode is the current default.
| Parameter | Type | Description |
|---|---|---|
mode * | string | Mode name to remove. |
mode_set_file * | string | Path to the mode-set JSON file. |
tokens_root * | string | Root tokens directory for reference guard. |
create_mode_set
Author a new mode-set file for a new cascade dimension. The file must not already exist. default must be a member of modes.
| Parameter | Type | Description |
|---|---|---|
default * | string | Default mode — must be a member of modes. |
mode_set_file * | string | Destination path for the new mode-set JSON file (must not exist). |
modes * | array | Ordered list of mode names, e.g. ['light', 'dark']. |
name * | string | Logical name used as the key in token name objects, e.g. 'colorScheme'. |
description | string | Human-readable description embedded in the file. |
remove_mode_set
Delete a mode-set file. Aborts if any token in the dataset references this dimension.
| Parameter | Type | Description |
|---|---|---|
mode_set_file * | string | Path to the mode-set JSON file to remove. |
tokens_root * | string | Root tokens directory for reference guard. |
data_create
Create a new non-token data object (component, field, registry entry, mode-set, or guideline). Validates the JSON document against the category schema before writing. Fails if the file already exists — use data_edit to overwrite.
| Parameter | Type | Description |
|---|---|---|
category * | string | Data category to create in. |
document * | object | Full JSON document to write. Must include the category's required fields (e.g. `name`, `$schema`, `specVersion`). The filename is derived from the `name` field. |
dataset | string | Path to the dataset root (packages/design-data). Defaults to DESIGN_DATA_PATH minus /tokens. |
spec_schemas | string | Path to the design-data-spec schemas dir. Defaults to DESIGN_DATA_SPEC_SCHEMAS or auto-probed. |
data_edit
Replace an existing non-token data object with a new JSON document. Validates the document against the category schema before writing. Fails if the file does not exist — use data_create to create it. Edit is a full document replace, not a patch.
| Parameter | Type | Description |
|---|---|---|
category * | string | Data category to edit in. |
document * | object | Full replacement JSON document. The `name` field must match the existing file. |
dataset | string | Path to the dataset root (packages/design-data). Defaults to DESIGN_DATA_PATH minus /tokens. |
spec_schemas | string | Path to the design-data-spec schemas dir. Defaults to DESIGN_DATA_SPEC_SCHEMAS or auto-probed. |