bricks_list_custom_elements

UtilityBeginnerRead OnlyComplexity: 1/10
List all registered custom elements

Overview

Lists all registered custom Bricks elements with their names, labels, categories, and control summaries. This tool provides a quick inventory of all PHP-based custom elements that have been created via bricks_create_custom_element.

Use this tool to discover what custom elements are available before deciding whether to create a new one or reuse an existing element. It returns a summary view — for full details including render template and CSS, use bricks_read_custom_element on a specific element.

Key Features

Summary View
Returns name, label, category, and control count for each custom element without the verbose render template or CSS.
No Parameters
Simple tool with no required parameters — just call it to get the full list.

When to Use

Before creating a new custom element to check if a similar one exists
When auditing the site to understand what custom elements are registered
To get a quick inventory of all custom PHP elements in the child theme
Prerequisites
No prerequisites — this is a read-only tool
Custom elements must have been previously created with bricks_create_custom_element

When NOT to Use

When you need full details of a specific element — use bricks_read_custom_element
When you need to list components (not custom PHP elements) — use bricks_get_components

Parameters

1 Total Parameters1 Optional
(none)noneoptional
This tool takes no input parameters. It returns all registered custom PHP elements.

Code Examples

List all custom elements

Get a summary of all registered custom elements.

JSON
bricks_list_custom_elements()
Response
{
  "data": [
    {
      "name": "pricing-card",
      "label": "Pricing Card",
      "category": "custom",
      "controls": [
        { "key": "plan_name", "type": "text", "label": "Plan Name" },
        { "key": "price", "type": "text", "label": "Price" },
        { "key": "features", "type": "repeater", "label": "Features" }
      ]
    }
  ]
}

Common Mistakes

Confusing custom elements with components
Custom elements are PHP-based elements registered in the child theme. Components are Bricks-native reusable element groups. Use bricks_list_custom_elements for PHP elements and bricks_get_components for components.
Wrong
// Looking for components here
bricks_list_custom_elements()
// This only lists PHP elements, not components!
Correct
// For components:
bricks_get_components()
// For custom PHP elements:
bricks_list_custom_elements()

Tips & Warnings

Tips & Warnings

Summary only: This tool returns a summary. To see the full render template, CSS, and builder template for a specific element, use bricks_read_custom_element({ name: "element-name" }).

Child theme files: Custom elements are stored as PHP files in the child theme. The list reflects what is currently registered and loaded.

Return Values

FieldTypeDescription
dataarrayArray of custom element objects
data[].namestringElement slug (used as the type reference)
data[].labelstringDisplay label in the Bricks panel
data[].categorystringElement category
data[].controlsarrayControl summary (key, type, label for each)

Related Tools

Technical Details

Tool ID
bricks_list_custom_elements
API Endpoint
/bricks-mcp/v1/custom-elements
HTTP Method
GET
Namespace
components
Source File
components/custom-elements.ts
Version
1.0
Min Bricks Version
1.9
Requires Auth
Yes

Changelog

v1.0
Initial release
20250101