bricks_get_site_context

Phase 1BeginnerRead OnlyComplexity: 1/10
Get WordPress version, Bricks version, plugins, post types

Overview

Returns comprehensive WordPress and Bricks site information in a single call. This is the first tool you should call when connecting to any site, as it provides the full context needed to make informed decisions about what tools and features are available.

The response includes WordPress version, Bricks version, active theme, registered post types and taxonomies, active plugins, template counts, breakpoint definitions, global class count, component count, and color palette count.

Key Features

Complete Site Overview
Returns WordPress version, Bricks version, active theme, and PHP version in one response.
Post Type Discovery
Lists all registered post types and taxonomies including custom ones, with their labels, REST bases, and capabilities.
Plugin Inventory
Shows all active plugins so you know which integrations are available (ACF, WooCommerce, Yoast, etc.).
Design System Counts
Reports the number of templates, global classes, components, and color palettes already configured.
Breakpoint Definitions
Returns all configured breakpoints with their widths, essential for responsive design planning.

When to Use

Always call first before making any changes to understand the site
Check which Bricks version is installed to know available features
Discover registered custom post types and taxonomies
Verify which plugins are active (ACF, WooCommerce, etc.)
Get breakpoint widths for responsive design planning
Prerequisites
No prerequisites — this is the starting point for any workflow

When NOT to Use

When you already have the site context from a previous call in the same session
When you only need specific information like colors or classes — use dedicated tools instead

Parameters

1 Total Parameters1 Optional
(none)noneoptional
This tool takes no input parameters. It returns WordPress version, Bricks version, active plugins, and breakpoint configuration.

Code Examples


Warning: Undefined array key "example_output" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 12

Phase 1: Read Site Context

Always the first call in any workflow. Returns comprehensive site information including WP/Bricks versions, post types, plugins, breakpoints, and design system counts.

JSON
bricks_get_site_context()

Common Mistakes


Warning: Undefined array key "fix_description" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 47

Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-includes/kses.php on line 1935

Warning: Undefined array key "wrong_code" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 48

Warning: Undefined array key "right_code" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 49
Agents often jump straight to creating pages without understanding the site first. Always call bricks_get_site_context before any modifications to understand available features, existing content, and version constraints.

Warning: Undefined array key "fix_description" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 47

Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-includes/kses.php on line 1935

Warning: Undefined array key "wrong_code" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 48

Warning: Undefined array key "right_code" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 49
Site context rarely changes during a build session. Call it once at the start and reuse the information rather than calling it before every operation.

Tips & Warnings

Tips & Warnings

Phase 1 Essential: This tool is step 1 of the 7-step Phase 1 workflow. After calling it, proceed to bricks_list_pages, bricks_get_color_palette, bricks_get_global_classes, bricks_get_global_variables, bricks_get_theme_styles, and bricks_get_breakpoints to complete Phase 1.

Version awareness: Check the Bricks version returned — features like Style Manager (v2.2+), global queries (v2.1+), and filter queries require specific minimum versions.

Return Values

FieldTypeDescription
wordpress_versionstringWordPress version number
bricks_versionstringBricks Builder version number
active_themestringCurrently active theme name
post_typesarrayAll registered post types with slug, label, REST base, and archive status
taxonomiesarrayAll registered taxonomies with slug, label, and associated post types
pluginsarrayActive plugins with name and version
breakpointsarrayConfigured breakpoints with key, label, and width
templates_countnumberTotal number of Bricks templates
global_classes_countnumberNumber of global CSS classes
components_countnumberNumber of reusable components
color_palettes_countnumberNumber of color palettes configured

Related Tools

Technical Details

Tool ID
bricks_get_site_context
API Endpoint
/site-context
HTTP Method
GET
Namespace
wordpress-site
Source File
wordpress/site-info.ts
Version
1.0
Min Bricks Version
1.9
Requires Auth
Yes

Changelog

v1.0
Initial release
20250101