Skip to main content
Glama

bricks_html_to_bricks

Converts HTML and CSS into Bricks Builder JSON elements, handling flex-to-container, grid-to-CSS custom, and other Bricks conventions automatically.

Instructions

Convert HTML/CSS to Bricks Builder JSON elements. Tries Bricks 2.3 native converter first, falls back to our local converter. Handles flex→container, grid→_cssCustom, px stripping, and all Bricks conventions automatically.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cssNoOptional CSS stylesheet to apply. Class-based rules will be matched to elements.
htmlYesHTML markup to convert. Can be a full page or a fragment.
prefer_nativeNoTry Bricks 2.3 native HTML converter first (default: true). Falls back to local converter if unavailable.
resolve_classesNoResolve HTML CSS class names against the site's global class registry. Matches are added as _cssGlobalClasses. Default: true.
wrap_in_sectionNoWhether to wrap top-level non-section elements in section > container. Default: true.
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It transparently discloses key behaviors: tries native converter first, falls back, handles specific CSS property mappings (flex→container, grid→_cssCustom, px stripping) and all Bricks conventions. However, it does not mention side effects, error handling, or whether the conversion is idempotent.

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

Conciseness5/5

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

The description is two sentences long, front-loaded with the core purpose, and every clause adds value. No repetition or filler. It efficiently communicates the tool's function, fallback strategy, and specific conversion rules.

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

Completeness4/5

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

For a conversion tool with 5 high-coverage parameters and no output schema, the description adequately covers the conversion process and key behaviors. It could mention that the output JSON is ready for use with other Bricks tools (e.g., bricks_append_elements), but the current text is sufficient for an agent to understand input and processing.

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

Parameters3/5

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

Schema coverage is 100%, so the baseline is 3. The description adds context about automatic handling of CSS properties, which indirectly informs parameter use (e.g., css parameter). However, it does not elaborate on individual parameters beyond what the schema already provides.

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 a specific verb+resource: 'Convert HTML/CSS to Bricks Builder JSON elements.' It clearly distinguishes from sibling tool bricks_elementor_to_bricks, which converts from Elementor format. The fallback behavior and automated handling of conventions further clarifies its scope.

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

Usage Guidelines3/5

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

The description implies usage context (converting HTML/CSS) but does not explicitly state when to use this tool versus alternatives like bricks_elementor_to_bricks. It lacks when-not or exclusion guidance. The fallback behavior is mentioned but not the conditions for preferring native vs. local converter.

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