Query & Discovery
These tools never mutate state. They require edit_posts and are safe to call before any write operation. They’re how the AI figures out what exists before changing anything.
emcp-tools/list-widgets
Section titled “emcp-tools/list-widgets”Returns every registered widget type with names, titles, icons, categories, and keywords. The AI uses this to discover which widgets are available (free + Pro + custom + third-party).
Returns: array of { name, title, icon, categories, keywords }.
emcp-tools/get-widget-schema
Section titled “emcp-tools/get-widget-schema”Returns the curated params for a widget by default: the settings you actually need, with types and defaults. Pass a types array to inspect several widgets at once, or full: true for the complete auto-generated control schema. Used before add-free-widget / add-pro-widget to know which settings are valid.
Input: widget_type (e.g. "heading", "button", "form").
Returns: curated params object (or the full JSON Schema when full: true).
emcp-tools/get-page-structure
Section titled “emcp-tools/get-page-structure”Returns the full element tree for an Elementor-enabled page: containers, widgets, nesting, IDs. The starting point for any “edit this page” workflow.
Input: post_id.
Returns: tree of { id, elType, widgetType?, settings, elements: [...] }.
emcp-tools/get-element-settings
Section titled “emcp-tools/get-element-settings”Returns the current settings of a specific element by ID.
Input: post_id, element_id.
Returns: settings object.
emcp-tools/list-pages
Section titled “emcp-tools/list-pages”Lists every Elementor-enabled page or post on the site.
Returns: array of { id, title, status, post_type, edit_url }.
emcp-tools/list-templates
Section titled “emcp-tools/list-templates”Lists saved templates from the Elementor template library.
Returns: array of { id, title, type, date, author }.
emcp-tools/get-global-settings
Section titled “emcp-tools/get-global-settings”Returns the active Elementor kit’s global settings: color palette, typography presets, spacing, default fonts.
Returns: kit settings object.
Typical flow
Section titled “Typical flow”1. list-pages → find the target page2. get-page-structure → understand existing layout3. get-element-settings → inspect a specific element you want to modify4. update-widget → apply changesReading before writing is the most reliable pattern for the AI. It prevents the “regenerate from scratch” failure mode and keeps existing content intact.