Skip to main content

list_tokens_by_mode

Retrieves all design tokens for a specific mode within a tokenset.

Tool Schema

{
  "name": "list_tokens_by_mode",
  "description": "List all tokens for a specific mode",
  "inputSchema": {
    "type": "object",
    "properties": {
      "tokenset_id": {
        "type": "string",
        "description": "The ID of the tokenset"
      },
      "mode_id": {
        "type": "string",
        "description": "The ID of the mode"
      }
    },
    "required": ["tokenset_id", "mode_id"]
  }
}

Parameters

ParameterTypeRequiredDescription
tokenset_idstringYesTokenset ID
mode_idstringYesMode ID

Response

{
  "tokens": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440030",
      "name": "color.primary",
      "type": "color",
      "value": "#007AFF",
      "description": "Primary brand color",
      "alias_to": null,
      "mode_id": "550e8400-e29b-41d4-a716-446655440020",
      "tokenset_id": "550e8400-e29b-41d4-a716-446655440010",
      "created_at": "2025-01-15T13:00:00Z",
      "updated_at": "2025-01-15T13:00:00Z"
    }
  ],
  "total": 1
}

Example Usage

Basic Request

You: Show me all tokens in the Light mode of the Colors tokenset
Claude: **Light Mode - Colors Tokenset** (50 tokens)

**Colors**:
- colors.primary.500: #3b82f6 (Primary brand color)
- colors.primary.600: #2563eb
- colors.background.default: #ffffff
...

Filtered Request

You: Show me only the color tokens with "primary" in the name
Claude: [Filters tokens]
        
Found 8 primary color tokens:
- colors.primary.500: #3b82f6
- colors.primary.600: #2563eb
...

See Also