Skip to main content
Glama

bricks_apply_bem_component

Assign BEM component classes to page elements using a mapping of element IDs to BEM roles. Optionally apply a modifier to the root element.

Instructions

Apply BEM component classes to page elements. Maps element IDs to their BEM roles (_root, title, price, cta, etc.) and assigns the corresponding global classes. Optionally adds a modifier class to the root element.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
blockYesBEM block name (must match a previously generated component)
mappingYesMap of Bricks element IDs to BEM element names. Use "_root" for the block element. Example: { "rt0074": "_root", "rt0075": "title", "rt0076": "price" }
page_idYesPage ID containing the elements
modifierNoOptional modifier to apply to the root element (e.g., "featured", "dark")
Behavior2/5

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

No annotations provided, so description must cover behavioral traits. It indicates a mutation ('applies', 'assigns') but fails to disclose side effects (e.g., overwriting existing classes), idempotency, required permissions, or what happens on errors. Safety implications are unaddressed.

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?

Two sentences: first defines the core action and mapping, second covers optional modifier. No redundant words, efficient use of space, and front-loaded with purpose.

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

Completeness3/5

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

Given the tool has 4 parameters (including a nested object) and no output schema or annotations, the description adequately covers what the tool does but lacks details on return values, error conditions, or expected behavior after application. It's sufficient for basic invocation but not fully complete.

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?

With 100% schema description coverage, baseline is 3. The description adds value by explaining the mapping object structure, mentioning common BEM roles (_root, title, etc.), providing an example, and clarifying the optional modifier. This enriches understanding beyond the schema.

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?

Description clearly states the tool applies BEM component classes to page elements by mapping element IDs to BEM roles. It distinguishes itself from siblings like bricks_generate_bem_component (generation) and bricks_apply_class_to_element (generic class application) with specific BEM terminology.

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?

Usage is implied but not explicit: after generating a BEM component via bricks_generate_bem_component, this tool applies the classes. No when-not scenarios or alternatives mentioned, such as bricks_apply_class_to_element for non-BEM contexts.

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