Skip to main content

delete_token

Permanently deletes a design token from a specific mode.

Tool Schema

{
  "name": "delete_token",
  "description": "Delete a token",
  "inputSchema": {
    "type": "object",
    "properties": {
      "tokenset_id": {
        "type": "string",
        "description": "The ID of the tokenset"
      },
      "mode_id": {
        "type": "string",
        "description": "The ID of the mode"
      },
      "token_id": {
        "type": "string",
        "description": "The ID of the token to delete"
      }
    },
    "required": ["tokenset_id", "mode_id", "token_id"]
  }
}

Parameters

ParameterTypeRequiredDescription
tokenset_idstringYesThe ID of the tokenset containing the token
mode_idstringYesThe ID of the mode containing the token
token_idstringYesThe ID of the token to delete

Response

{
  "message": "Token deleted successfully"
}

Example Usage in Claude

Delete a Token

You: Delete the old color.accent token from the Light mode

Claude: I need to confirm this action since it will permanently delete the token.

Are you sure you want to delete the token "color.accent" with value "#FF9500"? This action cannot be undone.

Confirm Deletion

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

Claude: Deleting token "color.accent"...

Token deleted successfully.

Common Use Cases

1. Token Cleanup

You: Remove unused or deprecated tokens from the design system

2. Brand Changes

You: Delete old brand colors that are no longer part of the palette

3. System Simplification

You: Remove experimental tokens that didn't work out

Warnings

⚠️ Destructive Action: This operation cannot be undone. When you delete a token, consider:
  • Is this token referenced by aliases in other tokens?
  • Is this token used in exported designs or code?
  • Will this break any existing implementations?

Best Practices

  1. Check dependencies: Search for tokens that might reference this one
  2. Export backup: Consider exporting before deletion
  3. Team communication: Notify team members before deleting shared tokens
  4. Gradual removal: Mark as deprecated first, then delete later

Notes

  • This action is permanent and cannot be reversed
  • Only deletes the token from the specific mode (other modes keep their versions)
  • Token IDs are not reusable after deletion
  • Aliases pointing to this token will need to be updated

Mode-Specific Deletion

Tokens are mode-specific, so deleting a token from one mode doesn’t affect:
  • The same token name in other modes
  • Other tokens in the same mode
  • The token structure or relationships

See Also