Skip to main content
Glama

sync_design_tokens

Map design tokens to a Tailwind theme.extend object. Optionally import a W3C DTCG token file before mapping. Returns CSS variable references for colors, spacing, and more.

Instructions

Map registry tokens to a Tailwind theme.extend object; optionally import a W3C DTCG token file first.

Prereq: tokens in the registry (pull_design_system first) — or pass dtcgFile to import them here. Never throws — returns {} when empty. Returns: partial theme (colors, spacing, fontSize, borderRadius, boxShadow) using var(--token) references; keys from the last token-name segment; "other" tokens skipped. With dtcgFile also { imported, warnings }. vs get_tokens: get_tokens = raw data for inspection (format "dtcg" exports the DTCG document); this = paste-ready Tailwind patch.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dtcgFileNoPath to a W3C Design Tokens (.tokens.json / DTCG) file to import into the registry before mapping. Upserts by token name; parse warnings are returned, never silently dropped.
Behavior5/5

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

Discloses key behaviors: never throws, returns empty object on empty, describes output structure (partial theme with var(--token) references, 'other' tokens skipped), and explains upsert behavior and warning handling for dtcgFile.

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

Conciseness5/5

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

Well-structured with clear sections: purpose, prerequisite, behavior, output, and sibling comparison. Every sentence adds value without redundancy.

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?

Despite no output schema, the description thoroughly explains return values, edge cases (empty, skipping 'other' tokens), and optional return with dtcgFile. Covers all needed context for correct agent invocation.

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

Parameters4/5

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

Schema covers the parameter fully. Description adds extra context: 'Upserts by token name; parse warnings are returned, never silently dropped', which goes beyond the schema description and aids agent understanding.

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?

The description clearly states the tool's purpose: mapping registry tokens to a Tailwind theme.extend object, with optional DTCG file import. It distinguishes itself from the sibling 'get_tokens' by noting that this tool produces a paste-ready Tailwind patch.

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 mentions prerequisite (pull_design_system first) or alternative approach (pass dtcgFile). Also contrasts with get_tokens for inspection vs. this for ready-to-use output.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sarveshsea/memi'

If you have feedback or need assistance with the MCP directory API, please join our Discord server