Skip to main content
Glama

Design tokens

get_design_tokens
Read-onlyIdempotent

Look up an app's normalized design tokens for color, spacing, radius, or font, plus CSS var and TS/RN names, so fixes use tokens instead of hard-coded literals.

Instructions

Return the app's normalized design tokens (DTCG: path, type, resolved value, hex / px, alias, CSS var, TS and RN names, description, defining file) for the active token set, plus nameMap (CSS var or TS name → token path). This is the tool that makes a fix use the app's tokens instead of hard-coded literals: look up the token for a colour, spacing, radius or font before writing one. Optional filters: group (first path segment, e.g. color, space), type (color | dimension | fontFamily | …), direction (a named token set instead of the active one). Returns { projectId, set, tokens, nameMap, total }; at most 500 tokens. Read-only. Use get_design_deviance to see where code drifts off these tokens, or get_app_recipe for the overall state.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNoOnly tokens of this DTCG $type (color, dimension, fontFamily, …).
groupNoOnly tokens in this group (first path segment, e.g. color, space, radius).
directionNoA named token set (directions/<name>/) instead of the active one.
projectIdNoProject UUID — defaults to the server-configured project when omitted (`project_id` is accepted too.)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.14

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint and idempotentHint, and the description reinforces 'Read-only'. Crucially, it adds behavioral facts annotations cannot convey: the 500-token cap, the exact return shape { projectId, set, tokens, nameMap, total }, and the nameMap direction (CSS var/TS name → token path). It doesn't discuss pagination or how the cap interacts with filters, which is the remaining gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the return payload, then the motivating use case, then filters, then the return shape and limit. Dense but every clause carries information. Slightly repetitive in listing both return fields in prose and in { ... } form.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only lookup tool with no output schema, the description supplies the return shape, the cap, the nameMap semantics, and routing to the two most relevant siblings. An agent has everything needed to invoke and interpret it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all four parameters. The description adds useful framing for group/type/direction (e.g. direction means 'a named token set instead of the active one') but largely restates what the schema provides. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (Return) and resource (normalized design tokens) and enumerates the exact payload fields (path, type, resolved value, hex/px, alias, CSS var, TS/RN names, description, defining file). This clearly distinguishes it from siblings like get_design_settings (settings) and get_design_deviance (drift analysis).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states the primary use case ('makes a fix use the app's tokens instead of hard-coded literals: look up the token for a colour, spacing, radius or font before writing one') and names two alternatives with their distinct purposes: get_design_deviance for drift, get_app_recipe for overall state.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.