bricks_get_variable_categories

Phase 1BeginnerRead OnlyComplexity: 1/10
List all variable categories

Overview

Lists all global variable categories defined in the Bricks design system. Categories are used to organize CSS custom properties in the Bricks builder UI, grouping related variables together (e.g., « Spacing », « Colors », « Typography », « Sizing »).

Use this tool to understand how the current design system is organized before adding new variables or categories. Each category has an ID and a display name.

Key Features

Complete Category Listing
Returns every variable category with its unique ID and display name, giving a clear picture of the design system organization.
No Parameters Required
This is a simple read-only tool with no parameters — just call it to get the full list.
Scale Configuration (Bricks 2.2+)
Categories may include a scale property indicating they are included in the Style Manager CSS generation.

When to Use

Checking what variable categories exist before creating new ones
Understanding the organizational structure of the design system
Verifying category names to pass into variable creation tools
Auditing the design system organization during Phase 1
Prerequisites
Bricks Builder must be active. The tool works even with no categories defined — it returns an empty array.

When NOT to Use

When you need to see the variables themselves — use bricks_get_global_variables which includes categories in its response
When you want to create a new category — use bricks_create_variable_category

Parameters

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

Code Examples

List All Variable Categories

Retrieve the list of categories to understand design system organization.

JSON
bricks_get_variable_categories({})
Response
[{"id": "cat_abc", "name": "Spacing"}, {"id": "cat_def", "name": "Colors"}, {"id": "cat_ghi", "name": "Typography"}, {"id": "cat_jkl", "name": "Sizing"}]

Common Mistakes

Using this tool to get variables when you actually need the variables themselves.
This tool returns only category metadata (IDs and names), not the variables. Use bricks_get_global_variables to get actual variables, which also includes category information.
Wrong
// This returns categories only, NOT variables
const vars = bricks_get_variable_categories({})
// vars = [{ id: "cat1", name: "Spacing" }] — no variable values!
Correct
// This returns variables AND categories
const data = bricks_get_global_variables({})
// data.variables = [{ id: "v1", name: "spacing-xs", value: "4px" }]
// data.categories = [{ id: "cat1", name: "Spacing" }]

Tips & Warnings

Tips & Warnings

Standard categories: A well-organized design system typically has these categories: « Spacing », « Colors », « Typography », « Sizing », « Borders », « Shadows ». You do not need to create categories manually — they are auto-created when you assign a category name in bricks_create_global_variable or bricks_create_variables_batch.

Tip: Use bricks_get_global_variables instead if you need both categories AND variables in one call — it returns both.

Return Values

FieldTypeDescription
categoriesarrayArray of category objects, each containing id (string) and name (string). May also include scale configuration for Bricks 2.2+.

Related Tools

Technical Details

Tool ID
bricks_get_variable_categories
API Endpoint
/bricks-mcp/v1/design-system/variables/categories
HTTP Method
GET
Namespace
design-system
Source File
design-system/variables.ts
Version
1.0
Min Bricks Version
1.9
Requires Auth
Yes

Changelog

v1.0
Initial release
20250101