Governed ability

Insert a WPBakery template

aafm/wpbakery-insert-templateGuarded write

Insert a WPBakery template is a governed WPBakery Page Builder ability in Agent Abilities for MCP, a free WordPress plugin that runs an MCP server on your site.

Copies a template, named by its id and source from wpbakery-list-templates (saved, from WPBakery's own library, or templatera, a published Templatera template post the user can edit and may use on this post by the template's own role and post type lists, only while Templatera is active), into a WPBakery page or Grid Builder template, before or after an element from the outline of wpbakery-get-page-content or as its first or last child; on an empty post with no builder, leave out the anchor to start the page, where this one check follows WPBakery's own setting for which post types its editor is on for. The template's stored text is copied byte for byte; with mode reference (Templatera only) one Templatera element is placed instead, which shows the template's current content and gets the same unfiltered HTML checks on that content as a copy. A Templatera template it shows by reference, at any depth, gets the same access check and content checks; a reference loop is refused. WPBakery's own nesting rules apply to its top level, and a template may hold at most 50 elements, nested at most 6 deep. A template holding raw HTML, raw JS, a map, a custom onclick setting or Design Options needs a user who may post unfiltered HTML, and for any other user its text may hold no square bracket, percent-encoded bracket, data-* attribute, unfinished tag or HTML that WordPress would remove. Requires page_fingerprint from the last read or write and returns the new one; a changed page is refused and nothing is saved. Other indexes may move, so read the outline again before the next structural change. When a revision is kept, restore_revision_id brings the page back through restore-revision. The page's generated CSS is rebuilt. Not undoable from this plugin's change history. Requires edit access to the post; WPBakery's Role Manager settings are not applied, though its own save filter still runs. Only while WPBakery Page Builder is active.

How it is governed

The same model as every ability in the plugin, stated for this one.

  • Off until you enable it

    Like every ability, Insert a WPBakery template ships switched off. You turn it on one at a time, and an update never switches on a tool it serves.

  • Guarded write

    Writes stay conservative, and the plugin re-checks the capability before the call runs.

  • Capability gated

    A connection only sees Insert a WPBakery template if the user you connected can run it, and the plugin checks that capability again before it executes.

  • Every call audited

    The call is written to the log in your own database, denials included, with the argument keys and the identifiers it touched, never free-text content.

Insert a WPBakery template is one of the 12 governed WPBakery Page Builder abilities. See the full WPBakery Page Builder MCP integration.

See it in action

An illustrative run. Your real calls and data stay on your own site.

agent-abilities · auditGoverned
YouInsert a WPBakery template on this site.
RunRunning aafm/wpbakery-insert-template
GateAllowedcapability re-checked before running
Auditaafm/wpbakery-insert-template · principal: editor · args: post_id
ResultApplies the change, then writes the call to the audit log.

Try it with a prompt

Example requests you could paste to your agent.

  1. Insert our saved Contact strip template at the bottom of page 57.
  2. Place the Templatera footer template on page 57 by reference.

These are illustrative example prompts. The agent runs them as the user you connected, checked against that user's capabilities and written to your audit log.

Frequently asked

Short answers for Insert a WPBakery template.

Copy or reference?

A template is copied byte for byte. With mode reference, Templatera only, one Templatera element is placed instead, which shows the template's current content and gets the same checks as a copy. A reference loop is refused.

Can I undo it?

Not from the Changes tab, which does not record this tool. When a revision is kept, restore_revision_id brings the page back through Restore revision.

Back to all abilities

Governed by default, from the first call.

Insert a WPBakery template is off until you enable it, scoped to the user you connect, and logged like everything else. Turn on only what you need.

Every ability off until you enable it, capability-gated on every call.