Skip to main content
Glama

Design tokens

get_tokens
Read-only

Extract a Figma file’s local variables and styles as a readable list, CSS custom properties, or JSON so coding agents can use design tokens.

Instructions

The file's local variables (all modes) and styles — as a readable list, CSS custom properties, or JSON.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_tokens"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileNoWhich open Figma file (name or key) when several are connected. Default: the most recently active.
filterNoOnly tokens whose name contains this.
formatNoDefault list.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

The readOnlyHint annotation already establishes the safety profile, so the description only needs to add scope context. It does add one useful behavioral fact — that all variable modes are returned — but omits whether library/remote styles are included, whether output is truncated for large files, or how the CSS variant is structured.

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?

A single compact sentence with no filler, and the resource scope is front-loaded before the output-format options. It is a verbless noun phrase, which is slightly terse for an entry point, but nothing is wasted.

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

Completeness3/5

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

For a three-parameter read tool with full schema coverage and no output schema, the definition covers the essentials but leaves gaps: whether non-local/library tokens are in scope, and what each output format actually returns. Adequate, but not complete for an agent deciding between this and get_css.

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 coverage is 100%, so file, filter, and format are already fully documented in the schema. The description's phrasing 'readable list, CSS custom properties, or JSON' loosely maps to the format enum and clarifies that 'css' yields custom properties, but adds no new meaning for file or filter; baseline 3 applies.

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

Purpose4/5

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

The description names a specific resource: the file's local variables (all modes) and styles, and enumerates the output forms (list, CSS custom properties, JSON). It does not explicitly distinguish itself from siblings like get_css or get_design, so the reader must infer the boundary, but the resource scope is concrete enough to identify the tool.

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

Usage Guidelines2/5

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

There is no when-to-use guidance and no exclusions; the description never says why to pick this over get_css (which presumably also emits CSS) or get_design. The only implied usage is 'I want tokens', which the agent must deduce from the noun phrase alone.

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