bricks_get_page_settings

Phase 1BeginnerRead OnlyComplexity: 2/10
Read page SEO settings, custom CSS, and scripts

Overview

Retrieves the complete Bricks page settings for a specific page. Returns SEO metadata (document title, meta description, meta keywords, robots directives), Open Graph social sharing data, custom CSS, custom scripts for header and footer injection points, body classes, and layout overrides (header/footer disabled flags).

This is a read-only tool used to inspect the current page configuration before making changes with bricks_update_page_settings, or to verify that settings were applied correctly after an update.

Key Features

Complete Settings Snapshot
Returns every page-level setting in a single call: SEO fields, social sharing, custom code injection points, body classes, and layout override flags.
Pre-Update Inspection
Use before bricks_update_page_settings to understand the current state, ensuring you do not accidentally overwrite important existing configuration.

When to Use

Before updating page settings to understand what is already configured
To verify that SEO or Open Graph settings were applied correctly
To audit page-level custom CSS and scripts across the site
When debugging layout issues related to header/footer overrides
Prerequisites
The page must exist. Use bricks_list_pages to find valid page IDs.

When NOT to Use

To read page element content — use bricks_get_page_content instead
To get a high-level page overview — use bricks_get_page_summary instead

Parameters

1 Total Parameters1 Required
page_idnumberREQUIRED
The WordPress page (post) ID to retrieve settings for.

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

Inspect settings before updating

Read existing page settings to check what SEO configuration already exists before making changes.

JSON
// Check current settings
const settings = bricks_get_page_settings({ page_id: 42 });
// Returns: { documentTitle: "...", metaDescription: "...", customCss: "...", ... }

// Now safely update only what is missing
bricks_update_page_settings({
  page_id: 42,
  settings: {
    metaDescription: 'Updated description for the page.'
  }
})

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 2018

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
This tool returns page-level metadata (SEO, scripts, layout overrides), not the Bricks element tree. Use bricks_get_page_content to read elements.

Tips & Warnings

Tips & Warnings

Read-only: This tool only reads settings. To modify them, use bricks_update_page_settings with the same page_id.

Empty fields: Settings that have never been configured will return as empty strings or null. This is normal and does not indicate an error.

Return Values

FieldTypeDescription
bodyClassesstringCustom CSS classes applied to the body tag for this page.
headerDisabledbooleanWhether the header template is disabled on this page.
footerDisabledbooleanWhether the footer template is disabled on this page.
documentTitlestringCustom SEO title tag for the page.
metaDescriptionstringMeta description for search engine results.
sharingTitlestringOpen Graph title for social sharing previews.
sharingDescriptionstringOpen Graph description for social sharing previews.
sharingImageobjectOpen Graph image object with url and id.
customCssstringPage-scoped custom CSS.
customScriptsHeaderstringScripts injected before the closing head tag.
customScriptsBodyFooterstringScripts injected before the closing body tag.

Related Tools

Technical Details

Tool ID
bricks_get_page_settings
API Endpoint
/bricks-mcp/v1/pages/{page_id}/settings
HTTP Method
GET
Namespace
pages-elements
Source File
pages/settings.ts
Version
1.0
Min Bricks Version
1.9
Requires Auth
Yes

Changelog

v1.0
Initial release with full page settings retrieval.
20250101