> ## 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.

# delete_mode

> Delete a mode and all its tokens

# delete\_mode

Permanently deletes a mode and all tokens within it. Cannot delete the last mode in a tokenset.

## Tool Schema

```json theme={null}
{
  "name": "delete_mode",
  "description": "Delete a mode and all its tokens (cannot delete the last mode in a tokenset)",
  "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 delete"
      }
    },
    "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 delete               |

## Response

```json theme={null}
{
  "message": "Mode deleted successfully"
}
```

## Example Usage in Claude

### Delete a Mode

```
You: Delete the "Experimental" mode from tokenset 550e8400-e29b-41d4-a716-446655440010

Claude: I need to confirm this action since it will permanently delete the mode and all its tokens.

Are you sure you want to delete the "Experimental" mode? This will also delete:
- 15 tokens in this mode

This action cannot be undone.
```

### Confirm Deletion

```
You: Yes, I'm sure. Delete it.

Claude: Deleting mode "Experimental"...

Mode deleted successfully. All tokens in this mode have been permanently removed.
```

## Common Use Cases

### 1. Cleanup Unused Themes

```
You: Remove the old "Blue Theme" mode that we're not using anymore
```

### 2. Simplify Design System

```
You: Delete the "Seasonal" mode after the campaign ended
```

### 3. Consolidate Modes

```
You: Remove duplicate or experimental modes
```

## Restrictions

⚠️ **Cannot delete the last mode**: Every tokenset must have at least one mode. If you try to delete the only mode in a tokenset, the operation will fail.

### Checking Before Deletion

Before deleting a mode, consider:

1. Is this the only mode in the tokenset?
2. Are there important tokens in this mode?
3. Is this mode referenced elsewhere?

## Warnings

⚠️ **Destructive Action**: This operation cannot be undone.

When you delete a mode, you also permanently delete:

* All tokens within that mode
* Any token relationships or aliases specific to that mode

### Best Practices

1. **Export data first**: Consider exporting tokens before deletion
2. **Check token count**: Review what tokens exist in the mode
3. **Team communication**: Notify team members before deleting shared modes
4. **Verify it's not the default**: Make sure you're not deleting the default mode

## Notes

* This action is permanent and cannot be reversed
* All tokens in the mode are completely removed
* The tokenset structure remains intact
* Mode IDs are not reusable after deletion
* If you delete the default mode, another mode will automatically become default

## See Also

* [list\_modes](/mcp/tools/list-modes) - View all modes before deletion
* [get\_mode](/mcp/tools/get-mode) - Check mode details
* [list\_tokens\_by\_mode](/mcp/tools/list-tokens-by-mode) - See tokens in the mode
* [export\_mode](/mcp/tools/export-mode) - Export tokens before deletion
