update_token
Modify design token values by name and mode, optionally syncing changes to Figma.
Instructions
Update a design token value in the local registry, optionally pushing to Figma.
Prereq: token must exist (names via get_tokens); Figma connection only for pushToFigma. Returns: { updated: true, name, pushedToFigma, reason? } — a requested-but-skipped or failed push is reported in reason, never silently dropped. Errors: isError if the token name is not found. For bulk Tailwind mapping use sync_design_tokens.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Token name as it appears in get_tokens output (e.g. "Colors/Primary") or as a DTCG dot-path (e.g. "colors.primary") — exact match tried first, then case-insensitive path match. | |
| values | Yes | Mode-to-value map to merge into existing values (e.g. { "Light": "#FF0000", "Dark": "#FF6666" }). Only the modes you provide are updated — other modes are preserved. | |
| pushToFigma | No | If true and Figma is connected, push this token change to the Figma file immediately. Defaults to false (local registry only). |