Skip to main content

find_tokens_by_type

Searches for all design tokens of a specific type across all workspaces, tokensets, and modes. This is perfect for finding all colors, spacing values, typography settings, or any other token type in your entire design system.

Tool Schema

{
  "name": "find_tokens_by_type",
  "description": "Find all tokens of a specific type across all workspaces, tokensets, and modes. No workspace ID needed!",
  "inputSchema": {
    "type": "object",
    "properties": {
      "type": {
        "type": "string",
        "description": "Token type to search for (color, dimension, fontSize, etc.)"
      }
    },
    "required": ["type"]
  }
}

Parameters

ParameterTypeRequiredDescription
typestringYesToken type to search for (see supported types below)

Supported Token Types

TypeDescriptionExamples
colorColor values#FF0000, rgb(255,0,0), hsl(0,100%,50%)
dimensionSpacing, sizing16px, 1rem, 2em
fontFamilyFont family namesInter, Arial, sans-serif
fontWeightFont weight values400, bold, normal
fontSizeFont sizes16px, 1.25rem
lineHeightLine height values1.5, 24px
letterSpacingLetter spacing0.5px, -0.02em
durationTime durations200ms, 0.3s
cubicBezierEasing curvescubic-bezier(0.4, 0, 0.2, 1)
numberNumeric values42, 3.14
stringText values"Hello World"
booleanTrue/false valuestrue, false
strokeStyleBorder stylessolid, dashed
borderBorder definitions1px solid #000
transitionCSS transitionsall 0.3s ease
shadowBox shadows0 2px 4px rgba(0,0,0,0.1)
gradientCSS gradientslinear-gradient(to right, #fff, #000)
typographyComplete text stylesComplex typography objects

Response

{
  "token_type": "color",
  "results": [
    {
      "workspace": {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "name": "Design System"
      },
      "tokenset": {
        "id": "550e8400-e29b-41d4-a716-446655440010",
        "name": "Colors"
      },
      "tokens": [
        {
          "id": "550e8400-e29b-41d4-a716-446655440030",
          "name": "color.primary",
          "type": "color",
          "value": "#007AFF",
          "description": "Primary brand color",
          "mode_id": "550e8400-e29b-41d4-a716-446655440020",
          "alias_to": null
        }
      ]
    }
  ],
  "total_found": 15,
  "usage": "Use these token IDs and mode IDs in other tools"
}

Example Usage in Claude

Find All Colors

You: Find all color tokens in my design system

Claude: I'll search for all color tokens across all workspaces.

Found 15 color tokens:

**Design System → Colors**
- color.primary: #007AFF (Light mode)
- color.secondary: #5856D6 (Light mode)
- color.primary: #0A84FF (Dark mode - darker variant)

**Mobile App → Theme**
- brand.primary: #FF6B35 (Light mode)
- brand.secondary: #F7931E (Light mode)

**Marketing → Brand**
- primary: #0066FF (Light mode)
- accent: #00D4AA (Light mode)

Use these tokens for consistent color usage across your products.

Find Typography Tokens

You: Show me all typography-related tokens

Claude: Let me find all typography tokens.

**Typography Tokens Found: 8**

**Design System → Typography**
- font.size.sm: 14px
- font.size.base: 16px
- font.size.lg: 18px
- font.size.xl: 24px
- font.family.primary: "Inter", sans-serif
- font.weight.normal: 400
- font.weight.bold: 700
- line.height.base: 1.5

Find Spacing Values

You: What spacing tokens do I have?

Claude: Searching for dimension tokens (spacing values).

**Spacing Tokens: 6 found**

**Design System → Spacing**
- spacing.xs: 4px
- spacing.sm: 8px
- spacing.md: 16px
- spacing.lg: 24px
- spacing.xl: 32px
- spacing.xxl: 48px

These form a consistent spacing scale for your design system.

Find Specific Token Types

You: Find all shadow tokens

Claude: Looking for shadow tokens across all workspaces.

**Shadow Tokens: 3 found**

**Design System → Components**
- shadow.sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05)
- shadow.md: 0 4px 6px -1px rgba(0, 0, 0, 0.1)
- shadow.lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1)

Common Use Cases

1. Design System Audit

You: What colors are being used across all my products?

2. Consistency Check

You: Do I have consistent spacing values everywhere?

3. Token Inventory

You: Show me all typography settings in use

4. Cross-Product Analysis

You: Find all gradient tokens for brand consistency

Notes

  • Searches across ALL workspaces you have access to
  • No workspace ID needed - searches everything
  • Returns tokens grouped by workspace and tokenset
  • Includes mode information for each token
  • Shows total count of tokens found

Tips

  1. Broad Search: Great for understanding your entire design system
  2. Token Types: Use exact type names (color, dimension, fontSize, etc.)
  3. Cross-Workspace: Finds tokens even across different projects
  4. Mode Awareness: Shows which mode each token belongs to

See Also