Skip to main content

Find Tokens by Type

Find all tokens of a specific type across all your workspaces, tokensets, and modes. This tool is perfect for discovering all tokens of a particular type without needing to know workspace IDs.

Description

This helper tool searches for tokens by type across your entire Tokencraft account. It automatically discovers all workspaces and searches through all tokensets and modes to find tokens of the specified type. No workspace ID required!

Parameters

Response

Returns all tokens of the specified type with:
  • token_type: The type searched for
  • results: Array of workspaces and tokensets containing matching tokens
  • total_found: Total number of matching tokens
  • usage: Instructions on how to use the returned IDs

Example Usage

Example Response

Use Cases

  • Type discovery: Find all tokens of a specific type across your account
  • Type analysis: Analyze all tokens of a particular type
  • Type management: Manage all tokens of a specific type
  • Export by type: Export all tokens of a specific type
  • No workspace knowledge needed: Works without knowing workspace IDs

Supported Token Types

  • list_resources - Get workspace and tokenset IDs
  • search_tokens - Search tokens by name or value
  • get_tokens_by_mode - Get tokens from specific modes
  • export_tokenset - Export tokensets

Workflow Example

Best Practices

  1. Use exact type names: Use the exact token type names (case sensitive)
  2. Check all results: Review all workspaces and tokensets in results
  3. Use token IDs: Copy exact token IDs for other operations
  4. Combine with other tools: Use with search_tokens for more specific searches

Error Prevention

This tool helps prevent common errors:
  • ❌ Needing to know workspace IDs
  • ❌ Missing tokens in other workspaces
  • ❌ Using wrong token types
  • ✅ Finding all tokens of a type across your account
  • ✅ No workspace ID required

Common Use Cases

  • “Show me all dimension tokens”find_tokens_by_type(type: "dimension")
  • “Find all color tokens”find_tokens_by_type(type: "color")
  • “Get all fontSize tokens”find_tokens_by_type(type: "fontSize")
  • “List all spacing tokens”find_tokens_by_type(type: "dimension") then filter by name