Skip to main content
Glama

Delimit Design Extract Tokens

delimit_design_extract_tokens

Extract design tokens from CSS, SCSS, or Tailwind config to inventory a project's visual styles before creating a Tailwind config or component scaffold. Optionally fetch tokens from Figma.

Instructions

Extract design tokens from a project's CSS/SCSS/Tailwind config.

When to use: to inventory or generate design tokens before creating a Tailwind config or component scaffold. When NOT to use: to scaffold a component (use delimit_design_generate_component) or generate tailwind config (delimit_design_generate_tailwind).

Sibling contrast: delimit_design_generate_tailwind builds a config from these tokens; this extracts them.

Side effects: read-only scan of local CSS/Tailwind. Figma API integration auto-activates when a Figma token is found in FIGMA_TOKEN env var, ~/.delimit/secrets/figma.json, or via delimit_secret_store. Calls backends.ui_bridge.design_extract_tokens. Coerces token_types via _coerce_list_arg.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
token_typesNoToken types — "colors", "typography", "spacing", "breakpoints". Comma string or list. None = all.
project_pathNoProject directory to scan. Default = cwd.
figma_file_keyNoOptional Figma file key (uses Figma API if a token is available).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv4.7.9
    • changedInput schema / properties / figma_file_key / description
      Previous value: -"Optional Figma file key (auto-uses Figma API if a token is available)."New value: +"Optional Figma file key (uses Figma API if a token is available)."
    • changedInput schema / properties / project_path / description
      Previous value: -"Project directory to scan. Defaults to cwd."New value: +"Project directory to scan. Default = cwd."
    • changedInput schema / properties / token_types / description
      Previous value: -"Token types to extract (colors, typography, spacing, breakpoints)."New value: +"Token types — \"colors\", \"typography\", \"spacing\", \"breakpoints\". Comma string or list. None = all."
  2. Changed4 schema fields changedv4.5.5
    • addedInput schema / properties / figma_file_key / description
      Added value: +"Optional Figma file key (auto-uses Figma API if a token is available)."
    • addedInput schema / properties / project_path / description
      Added value: +"Project directory to scan. Defaults to cwd."
    • changedInput schema / properties / token_types / anyOf
      Previous value: -[
      -  {
      -    "items": {
      -      "type": "string"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / token_types / description
      Added value: +"Token types to extract (colors, typography, spacing, breakpoints)."
  3. First observedv0.1.0

TDQS

A3.7/5.0
Behavior1/5

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

The description discloses useful behavior such as Figma API auto-activation, secret lookup paths, backend calls, and token_types coercion. However, it states the operation is a 'read-only scan,' while the annotation readOnlyHint is false. Because readOnlyHint=false signals that the tool may modify state, this is an annotation contradiction, so the score is 1 per the rubric.

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?

The description is well organized: purpose, usage guidance, sibling contrast, then side effects. Some internal identifiers like backends.ui_bridge.design_extract_tokens add noise, but the structure is clear and front-loaded.

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

Completeness4/5

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

The description covers what the tool does, when to use it, when not to, sibling contrast, side effects, and Figma credential discovery. With an output schema present, return values need no explanation; the only completeness concern is the safety contradiction noted above.

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?

Input schema coverage is 100% and each parameter already has a description, default, and token_types values. The description's mention of _coerce_list_arg adds a minor implementation detail but does not materially improve parameter understanding beyond the schema.

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 opens with a specific verb and resource: 'Extract design tokens from a project's CSS/SCSS/Tailwind config.' It also names sibling tools it is not, so an agent can distinguish it from delimit_design_generate_tailwind and delimit_design_generate_component.

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?

It explicitly provides 'When to use,' 'When NOT to use,' and names the alternative tools for the excluded cases. This is exactly the routing guidance an agent needs and leaves no ambiguity about when to select this tool.

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

Deploy Server

Other Tools