Skip to main content

create_mode

Creates a new mode (theme) within a tokenset to support different design variations like light/dark themes.

Tool Schema

{
  "name": "create_mode",
  "description": "Create a new mode in a tokenset",
  "inputSchema": {
    "type": "object",
    "properties": {
      "tokenset_id": {
        "type": "string",
        "description": "The ID of the tokenset"
      },
      "name": {
        "type": "string",
        "minLength": 1,
        "maxLength": 255,
        "description": "The name of the mode"
      },
      "is_default": {
        "type": "boolean",
        "description": "Whether this mode should be the default mode"
      }
    },
    "required": ["tokenset_id", "name"]
  }
}

Parameters

ParameterTypeRequiredDescription
tokenset_idstringYesThe ID of the tokenset to create the mode in
namestringYesThe name of the mode (1-255 characters)
is_defaultbooleanNoWhether this mode should be the default mode

Response

{
  "id": "550e8400-e29b-41d4-a716-446655440025",
  "name": "Dark",
  "is_default": false,
  "tokenset_id": "550e8400-e29b-41d4-a716-446655440010",
  "created_at": "2025-01-20T16:00:00Z",
  "updated_at": "2025-01-20T16:00:00Z"
}

Example Usage in Claude

Create a Dark Mode

You: Create a new mode called "Dark" in tokenset 550e8400-e29b-41d4-a716-446655440010

Claude: I'll create a new Dark mode in your tokenset.

Mode created successfully:
- **Name**: Dark
- **ID**: 550e8400-e29b-41d4-a716-446655440025
- **Default**: No
- **Tokenset**: 550e8400-e29b-41d4-a716-446655440010

Create a Default Mode

You: Create a "High Contrast" mode and make it the default in my accessibility tokenset

Claude: I'll create the High Contrast mode and set it as the default.

Mode created successfully:
- **Name**: High Contrast
- **ID**: 550e8400-e29b-41d4-a716-446655440026
- **Default**: Yes ✓
- **Tokenset**: Accessibility Tokens

Common Use Cases

1. Theme Support

You: Add a dark theme mode to my color tokenset

2. Accessibility

You: Create a high contrast mode for accessibility

3. Brand Variations

You: Add a "Summer" seasonal mode to my brand colors

Notes

  • If is_default is set to true, the previous default mode will be automatically changed to non-default
  • Each tokenset can have only one default mode
  • New modes start empty - you’ll need to create tokens within them
  • Mode names should be unique within a tokenset
  • Common mode names include: Light, Dark, High Contrast, Seasonal, etc.

Default Mode Behavior

  • When no specific mode is requested, the default mode is used
  • Every tokenset must have exactly one default mode
  • If you don’t specify is_default, the new mode will be non-default

See Also