Elements
The Elements tools allow you to build and modify the structure of your Webflow pages by creating elements, updating their properties, and managing their attributes directly on the canvas.
Designer tools require the MCP Bridge App to be open in the Webflow Designer. Ensure it’s connected before using these tools.
When to use
Use Elements tools to:
- Build page structures: Create divs, containers, sections, and other layout elements
- Add content elements: Insert text, images, buttons, and interactive components
- Modify existing elements: Update attributes, styles, and properties
- Navigate element tree: Select and inspect elements on the page
- Set element content: Update text, images, and links
Tool details
Tool names: element_builder, element_tool
Available actions
Create elements
Build new elements on the current active page with support for nested structures.
Tool: element_builder
Parameters:
Action structure:
Constraints:
- Maximum 3 levels of nesting depth
- Unlimited children at each level
- Supports: container, section, div, and all valid DOM elements
Example usage:
Plan your element structure before building. Use element_builder for complete sections, not individual elements.
Get all elements
Retrieve all elements on the current page.
Action: get_all_elements
Parameters:
- Optional: Include style properties
- Optional: Include breakpoint data
Returns: Complete element tree with IDs, tags, and properties
Example usage:
Disable style and breakpoint data when not needed to reduce context size.
Get selected element
Get details about the currently selected element in the Designer.
Action: get_selected_element
Returns: Element properties, attributes, styles, and children
Example usage:
Select element
Select a specific element by its ID.
Action: select_element
Parameters:
Example usage:
Apply styles
Apply style classes to an element.
Action: set_style
Parameters:
Supports: Combo classes
Example usage:
Add or update attributes
Add or modify attributes on an element.
Action: add_attribute or update_attribute
Parameters:
Example usage:
Only elements with canHaveAttributes: true support custom attributes. Check element capabilities first.
Remove attribute
Remove an attribute from an element.
Action: remove_attribute
Parameters:
Example usage:
Update ID attribute
Set or update the custom ID (#id) of an element.
Action: update_id_attribute
Parameters:
Example usage:
Don’t include the ’#’ character when setting IDs. Use “hero-section”, not “#hero-section”.
Set text content
Update the text content of an element.
Action: set_text
Parameters:
Example usage:
Set link
Configure link properties for Button, TextLink, or LinkBlock elements.
Action: set_link
Parameters:
Example usage:
Set heading level
Change the heading level (H1-H6) of a heading element.
Action: set_heading_level
Parameters:
Example usage:
Set image asset
Assign an image asset to an Image element.
Action: set_image_asset
Parameters:
Example usage:
Best practices
Create styles before elements
Always create style classes before building elements if you plan to apply them during creation. This ensures proper styling from the start.
Select newly created elements
After creating an element with element_builder, it’s NOT automatically selected. Use select_element to inspect or modify it.
Check element capabilities
Before modifying elements, check their capabilities:
canHaveAttributes- Custom attributescanHaveChildren- Nested elementscanHaveStyles- Style classes
Not all elements support all features.
Use semantic HTML
Choose appropriate element types:
- Headings for titles (H1-H6)
- Paragraphs for text blocks
- Buttons for actions
- Links for navigation
- Sections for page areas
Semantic HTML improves accessibility and SEO.
Avoid selecting elements in the designer while the MCP Server is making changes
In order to add elements to the canvas, the MCP Servern needs to select elements on the canvas. If you select an element while the MCP Server is making changes, the MCP server may lose track of the element it’s working on and fail.
Limitations
- Nesting depth:
element_builderlimited to 3 levels - Auto selection: New elements aren’t automatically selected
- Container types: Only Container, Section, and DivBlock support children
- Attribute support: Not all elements accept custom attributes
- Designer required: Must have Bridge App open and connected