Skip to main content
Glama

get_tokens

Retrieve design tokens from the local registry to inspect available styles, validate token coverage, and check defined modes before implementing code.

Instructions

Get all design tokens currently stored in the local registry.

Prerequisites: None — reads from local registry without requiring a Figma connection. Run pull_design_system first if the registry is empty or stale.

Returns on success: Array of token objects, each with shape { name: string, type: "color"|"spacing"|"typography"|"radius"|"shadow"|"other", values: Record<string, string|number>, cssVariable?: string }. The values map is keyed by mode name (e.g. "Light", "Dark", "Default").

Error behavior: Returns an empty array [] if no tokens have been pulled yet — not an error.

Use this tool: to inspect available tokens before writing code (e.g. find the exact token name for a primary color), to validate token coverage before running sync_design_tokens, or to check which modes are defined. For a Tailwind-ready mapping, use sync_design_tokens instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behaviors: it's a read-only operation ('reads from local registry'), has no prerequisites, specifies error behavior ('Returns an empty array [] if no tokens have been pulled yet — not an error'), and details the return structure. This provides comprehensive behavioral context beyond what structured fields would offer.

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?

The description is well-structured with clear sections (purpose, prerequisites, returns, error behavior, usage scenarios) and every sentence adds value. It's appropriately sized for the tool's complexity and front-loads the core functionality while providing necessary details without waste.

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?

Given the tool has no input parameters, no annotations, and no output schema, the description provides complete context. It explains what the tool does, when to use it, behavioral characteristics, return format, error handling, and relationships to sibling tools. This is comprehensive for a zero-parameter read operation.

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?

The tool has zero parameters, so the description doesn't need to explain any inputs. With 100% schema description coverage (empty schema), the baseline would be 3, but the description appropriately focuses on output and usage rather than redundant parameter information, earning a higher score for efficient communication.

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 specific action ('Get all design tokens') and resource ('currently stored in the local registry'), distinguishing it from siblings like 'pull_design_system' (which fetches from Figma) and 'sync_design_tokens' (which creates Tailwind mappings). It explicitly defines what the tool does without being tautological.

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?

The description provides explicit guidance on when to use this tool ('to inspect available tokens before writing code', 'to validate token coverage', 'to check which modes are defined') and when to use alternatives ('For a Tailwind-ready mapping, use sync_design_tokens instead'). It also includes prerequisites and sibling tool relationships.

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/m-moire'

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