Skip to main content

get_tokens_by_mode

Retrieves all design tokens from a specific mode within a tokenset, with the ability to find modes by name rather than ID. This is especially useful when you know the mode name (like “Light”, “Dark”) but don’t have the mode ID.

Tool Schema

Parameters

Response

Example Usage in Claude

Get Default Mode Tokens

Get Specific Mode by Name

Compare Light and Dark

Handle Missing Mode

Common Use Cases

1. Theme Comparison

2. Mode-Specific Values

3. Default Mode Tokens

4. Named Mode Access

Mode Name Matching

  • Case-insensitive: “Light”, “light”, “LIGHT” all work
  • Partial matching: Will find the first mode containing the search term
  • Default fallback: If no mode_name provided, uses the default mode
  • Error handling: Shows available modes if the requested mode doesn’t exist

Notes

  • This tool is perfect when you know mode names but not IDs
  • Useful for theme comparisons and mode-specific token access
  • Returns resolved values (aliases are resolved to their actual values)
  • Includes token descriptions and types for context

Tips

  1. Mode Names: Common names are “Light”, “Dark”, “High Contrast”
  2. Default Mode: Omit mode_name to get the default mode tokens
  3. Case Insensitive: “dark”, “Dark”, “DARK” all work the same
  4. Comparison: Great for seeing how tokens change across themes

See Also