bricks_get_class_categories

Phase 1BeginnerRead OnlyComplexity: 1/10
List all global class categories

Overview

Lists all global class categories defined in the Bricks design system. Categories organize classes in the Bricks builder UI sidebar, making it easier for designers and developers to find and apply the right class.

This is a read-only tool with no parameters. Use it to discover the organizational structure of the class library before creating new classes or categories.

Key Features

Zero-Parameter Read
Takes no parameters — simply returns all categories. Quick and lightweight.
Category IDs
Returns category IDs needed for filtering classes or deleting categories.

When to Use

Before creating new class categories — check which ones already exist
When organizing classes during Phase 2 design system setup
To verify category names before assigning classes to them
When auditing the design system structure
Prerequisites
No prerequisites. This is a read-only tool that works on any Bricks site.

When NOT to Use

When you need class details — use bricks_get_global_classes with a category filter instead
When you want to create a category — use bricks_create_class_category

Parameters

1 Total Parameters1 Optional
(none)noneoptional
This tool takes no input parameters. It returns all global class categories.

Code Examples

List all class categories

Returns the complete list of categories used to organize global classes in the Bricks builder sidebar.

JSON
// List all class categories
bricks_get_class_categories()
Response
{
  "categories": [
    { "id": "cat01", "name": "Layout" },
    { "id": "cat02", "name": "Typography" },
    { "id": "cat03", "name": "Buttons" },
    { "id": "cat04", "name": "Cards" },
    { "id": "cat05", "name": "Utilities" }
  ]
}

Common Mistakes

Creating duplicate categories because you did not check existing ones first.
Always call bricks_get_class_categories before bricks_create_class_category to avoid duplicates.
Wrong
// Creating "Buttons" category without checking
bricks_create_class_category({ name: "Buttons" })
// Error: category "Buttons" already exists
Correct
// Check first
bricks_get_class_categories()
// See "Buttons" already exists — no need to create

Tips & Warnings

Tips & Warnings

Recommended categories: A well-organized design system typically uses these categories: Layout, Typography, Buttons, Cards, Utilities, and optionally Spacing, Forms, and Components.

Note: Classes can also be created with a category name that does not exist yet — the category will be created automatically by bricks_create_global_class.

Return Values

FieldTypeDescription
categoriesarrayArray of category objects, each with id (hex string) and name (display name).

Related Tools

Technical Details

Tool ID
bricks_get_class_categories
API Endpoint
/bricks-mcp/v1/design-system/classes/categories
HTTP Method
GET
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 — read-only listing of all class categories.
20250101