> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tokencraft.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# update_mode

> Update a mode name or default status

# update\_mode

Updates the name or default status of an existing mode.

## Tool Schema

```json theme={null}
{
  "name": "update_mode",
  "description": "Update a 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 to update"
      },
      "name": {
        "type": "string",
        "minLength": 1,
        "maxLength": 255,
        "description": "The new name of the mode"
      },
      "is_default": {
        "type": "boolean",
        "description": "Whether this mode should be the default mode"
      }
    },
    "required": ["tokenset_id", "mode_id"]
  }
}
```

## Parameters

| Parameter     | Type    | Required | Description                                  |
| ------------- | ------- | -------- | -------------------------------------------- |
| `tokenset_id` | string  | Yes      | The ID of the tokenset containing the mode   |
| `mode_id`     | string  | Yes      | The ID of the mode to update                 |
| `name`        | string  | No       | The new name of the mode (1-255 characters)  |
| `is_default`  | boolean | No       | Whether this mode should be the default mode |

## Response

```json theme={null}
{
  "id": "550e8400-e29b-41d4-a716-446655440025",
  "name": "Dark Theme",
  "is_default": true,
  "tokenset_id": "550e8400-e29b-41d4-a716-446655440010",
  "created_at": "2025-01-15T12:15:00Z",
  "updated_at": "2025-01-20T17:30:00Z"
}
```

## Example Usage in Claude

### Update Mode Name

```
You: Rename mode 550e8400-e29b-41d4-a716-446655440025 to "Dark Theme"

Claude: I'll update the mode name to "Dark Theme".

Mode updated successfully:
- **Name**: Dark Theme (updated)
- **Default**: Now default ✓
```

### Change Default Mode

```
You: Make the Dark mode the default in my color tokenset

Claude: I'll change the default mode to Dark. The previous default mode will become non-default.

Mode updated successfully:
- **Name**: Dark
- **Default**: Yes ✓ (changed from Light)
```

### Update Both Name and Default Status

```
You: Change mode 550e8400-e29b-41d4-a716-446655440025 to "Night Mode" and make it default

Claude: I'll update both the name and default status of the mode.

Mode updated successfully:
- **Name**: Night Mode (updated)
- **Default**: Yes ✓ (changed)
```

## Common Use Cases

### 1. Better Naming

```
You: Rename "Dark" to "Dark Theme" for clarity
```

### 2. Theme Switching

```
You: Make Dark mode the default theme
```

### 3. Reorganization

```
You: Change "HC" to "High Contrast" mode
```

## Default Mode Behavior

* Setting `is_default: true` will automatically change any other default mode to non-default
* Each tokenset can have only one default mode
* The default mode is used when no specific mode is requested
* You cannot remove the default status from a mode if it's the only mode in the tokenset

## Notes

* At least one of `name` or `is_default` must be provided
* Mode names must be unique within their tokenset
* The `updated_at` timestamp will be automatically updated
* All existing tokens within the mode remain unchanged

## See Also

* [get\_mode](/mcp/tools/get-mode) - Get mode details
* [list\_modes](/mcp/tools/list-modes) - View all modes in tokenset
* [create\_mode](/mcp/tools/create-mode) - Create new mode
