Add a widget
elementor_add_widgetInsert a new widget into an Elementor page by specifying its type and settings, then place it at the page root or inside a container or column relative to an existing element.
Instructions
Insert a new widget into a page. Pass the widget type (heading, image, button, text-editor, and so on — see elementor_list_widgets) and its settings. With no targetId the widget is appended to the page root; a widget must otherwise go inside a container or column, so use position before/after to place it beside an existing widget.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"postId": "<postId>",
"widgetType": "<widgetType>"
},
"name": "elementor_add_widget"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site | No | Configured site name. Omit to use the default site. | |
| postId | Yes | WordPress post ID of the Elementor page, post or template. | |
| position | No | append/prepend place the element inside the target; before/after place it as a sibling of the target. | append |
| settings | No | Elementor control values keyed by control name. Call elementor_get_widget_schema for the valid keys of a widget. Responsive variants use _tablet and _mobile suffixes, e.g. padding_tablet. | |
| targetId | No | Element to place this relative to. Omit to append at the page root. | |
| widgetType | Yes | Widget type name, e.g. "heading". |