bricks_delete_class_category

Phase 2BeginnerDestructiveComplexity: 2/10
Delete a class category

Overview

Deletes a global class category from the Bricks design system. Classes that were assigned to this category become uncategorized (they are not deleted, only their category association is removed).

This is useful when consolidating or reorganizing the category structure. The classes themselves remain fully functional and retain all their CSS settings.

Key Features

Safe Deletion
Deletes only the category grouping. Classes are preserved and become uncategorized, keeping all their styles intact.
Clean Reorganization
Enables category restructuring by removing obsolete groupings without affecting class functionality.

When to Use

When reorganizing the category structure and removing obsolete categories
When merging two categories (move classes to another category first, then delete the empty one)
When cleaning up categories created by mistake
Prerequisites
The category must exist. Use bricks_get_class_categories to find the category_id. Consider reassigning classes to another category first if you want them organized.

When NOT to Use

When you want to delete the classes in a category — this only deletes the category, not the classes
When you want to rename a category — there is no rename tool; create a new category and reassign classes

Parameters

1 Total Parameters1 Required
category_idstringREQUIRED
Category ID to delete. Get this from bricks_get_class_categories.

Code Examples

Delete an obsolete category

Removes a category that is no longer needed. Classes previously in this category become uncategorized but retain all their CSS settings.

JSON
// Delete an obsolete category
bricks_delete_class_category({
  category_id: "cat05"
})
Response
{
  "message": "Category 'Old Utilities' deleted. 3 classes are now uncategorized."
}

Common Mistakes

Deleting a category and expecting its classes to be deleted too.
Deleting a category only removes the grouping. Classes become uncategorized but remain fully functional. To delete classes, use bricks_delete_global_class.
Wrong
// Expecting this to delete all "Old" classes
bricks_delete_class_category({ category_id: "cat05" })
// Classes still exist, just uncategorized!
Correct
// To remove classes AND category:
// 1. Find classes in category
bricks_get_global_classes({ category: "Old Utilities" })
// 2. Delete each class
bricks_delete_global_class({ class_id: "..." })
// 3. Then delete the empty category
bricks_delete_class_category({ category_id: "cat05" })

Tips & Warnings

Tips & Warnings

Important: This only removes the category grouping — all classes in the category are preserved and become uncategorized. They retain all CSS settings and continue to work normally.

Best practice: Before deleting a category, use bricks_update_global_class to move important classes to another category. Then delete the now-empty category.

Return Values

FieldTypeDescription
messagestringSuccess confirmation message indicating the category was deleted and how many classes became uncategorized.

Related Tools

Technical Details

Tool ID
bricks_delete_class_category
API Endpoint
/bricks-mcp/v1/design-system/classes/categories/{category_id}
HTTP Method
DELETE
Namespace
design-system
Source File
design-system/classes.ts
Version
1.0
Min Bricks Version
1.9
Requires Auth
Yes

Changelog

v1.0
Initial release — safe category deletion with class preservation.
20250101