Skip to main content
Glama

bricks_update_page_assets

Assigns per-page CSS and JS assets to Bricks Builder pages, enqueuing dependencies and injecting inline scripts and infrastructure CSS.

Instructions

Set structured per-page assets (JS deps via wp_enqueue_script, JS in wp_footer, infra CSS in wp_head). Auto-sets GSAP flag when js_deps includes "gsap". Requires Bricks API Bridge v2.3+. ⚠️ The css field lands in plugin-private _bab_page_assets (wp_head 9997, BEFORE element CSS) which is INVISIBLE/uneditable in the Bricks builder — reserve it for INFRA only (@font-face, :root{--vars}, @keyframes, critical CSS). Human-editable layout/responsive/visual CSS belongs in a native channel: element _cssCustom (bricks_patch_page), page customCss (bricks_update_page_settings), or global CSS/classes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
jsNoInline JS to output in footer (no <script> tags, just code)
cssNoINFRA CSS only (raw rules, no <style> tags): @font-face, :root{--vars}, @keyframes, critical above-fold. NOT editable in the Bricks builder — do NOT put layout/responsive/visual CSS here; use element _cssCustom or page customCss instead. Editable CSS triggers a warning (or a hard block when BRICKS_MCP_BLOCK_EDITABLE_CSS=1).
js_depsNoJS dependencies to enqueue: "gsap", "scrolltrigger", "lenis"
page_idYesWordPress page/post ID
raw_footerNoRaw HTML for wp_footer (legacy catch-all, includes own tags)
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description fully covers behavioral traits: auto-sets GSAP flag, css field is invisible and not editable in builder, may trigger warnings or hard block if editable CSS is placed there, and requires Bricks API Bridge v2.3+. This is comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the main purpose, then provides detailed warnings and alternatives. While lengthy, every sentence adds value and it is well-structured. Minor redundancy could be trimmed, but overall efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 5 parameters, no output schema, and the complexity of per-page asset management (including infrastructure vs editable CSS separation), the description is thorough. It covers all necessary context: prerequisites, field constraints, alternatives, and behavioral notes.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so baseline is 3. The description adds extra context beyond the schema: js_deps auto-sets GSAP when including 'gsap', css field warns about editable CSS blocking, and raw_footer is described as legacy. This adds meaningful value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the specific function: 'Set structured per-page assets' with explicit categories (JS deps, inline JS, infra CSS). It distinguishes from sibling tools by noting that the css field is for infrastructure only and references alternatives for editable CSS, clearly differentiating its purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly tells when to use this tool (for infra CSS) and when not to (for layout/responsive/visual CSS), naming specific alternatives: element _cssCustom, page customCss, global CSS/classes. This provides clear usage guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/developer2013/bricks-mcp-open'

If you have feedback or need assistance with the MCP directory API, please join our Discord server