Dynamic Shortcodes
These abilities register when Dynamic Shortcodes is detected on the site and a Pro licence is active. If either is missing the module stays absent rather than failing at call time.
At a glance
Dynamic Shortcodes registers 9 abilities: 5 that only read, 3 that write, and 1 marked destructive. That split is the practical answer to how much of this module can run unattended. Reads cost nothing and are safe to repeat, so discovery is the part to be generous with; the writes are where review belongs, and the destructive calls stop for an explicit confirmation every single time regardless of which profile is active.
What this module is for
Compose, validate, evaluate, and manage Dynamic Shortcodes and Power Shortcodes with context inspection before use.
Before you rely on it: Evaluate dynamic expressions only in a constrained context and review output escaping where the result is rendered.
Typical workflows
- Inspect available context before composing a shortcode
- Validate a shortcode before evaluating it
- Create a reusable Power Shortcode from a reviewed expression
The Dynamic Shortcodes integration page covers the same module from the workflow side, with the capability map and the questions worth asking before a first write.
Availability on your site
The Dynamic Shortcodes module needs three things at once: WPPilot Free as the MCP foundation, an active Pro licence, and the companion plugin detected on the site. Miss any one and the module does not register, which is deliberate: an ability that appears in the tool list but fails at call time is worse than an ability that was never offered. What the connected agent can actually call is then narrowed twice more: by the safety profile active on the site, and by the WordPress capabilities of the user behind the credential. A read that succeeds for an administrator can be absent entirely for an editor.
Every write these abilities perform is recorded in the change ledger, and destructive calls can be routed through the approval queue so a person signs off before anything is applied. A successful tool result means the operation returned, not that the front end, the cache, and every dependent template are correct: that still needs a look.
Reads
Available in every safety profile, including Read Only. Inspection costs nothing and is not rate limited.
| Ability | What it does |
|---|---|
wppilot/dynamic-shortcodes-check-setupCheck Dynamic Shortcodes Setup | Reports the Dynamic Shortcodes environment: whether the plugin is active, the version, whether the minimum version is satisfied, the accepted shortcode types on this site, the detected dependency plugins (acf, woocommerce, jet-engine, metabox, pods, toolset, acpt), a count of saved Power Shortcodes, and enabled_areas — which content surfaces DSH actually resolves shortcodes in (post content, blocks, Elementor, Bricks, …; ALL default OFF, so a shortcode renders as literal text where its surface is off). Call BEFORE any other dynamic-shortcodes ability — the other abilities require min_satisfied=true to register. |
wppilot/dynamic-shortcodes-compose-shortcodeCompose Shortcode | Builds a syntactically correct Dynamic Shortcode string from a structured input (type, positional args, keyargs, filters, fallback) and lints it automatically. Returns {shortcode, valid, errors[]}. Use this when you want a guaranteed-shape output instead of hand-writing the string. |
wppilot/dynamic-shortcodes-get-contextGet Shortcode Context | Returns the list of fields available on this site for a given Dynamic Shortcode type (e.g. "post", "acf", "user", "term", "query", "woo"). Each field carries a name and its possible result types. Use this to discover real fields instead of guessing from documentation. Paginated — pass limit/offset for paging and name_pattern for a case-insensitive substring filter; the response includes total and has_more. |
wppilot/dynamic-shortcodes-list-power-shortcodesList Power Shortcodes | Lists every Power Shortcode defined on this site (name, code, description). |
wppilot/dynamic-shortcodes-validate-shortcodeValidate Shortcode | Validates the syntax of a Dynamic Shortcode string without evaluating it. Returns {valid, errors[], shortcode}. Use this after generating or editing a shortcode and before calling evaluate-shortcode. |
Writes
Gated by the active profile and your WordPress capabilities. Rate limited to 120 per minute per credential.
| Ability | What it does |
|---|---|
wppilot/dynamic-shortcodes-create-power-shortcodeCreate Power Shortcode | Creates a new Power Shortcode. The code is syntax-checked (linted) before saving: invalid Dynamic Shortcode syntax is rejected with invalid_shortcode_syntax and the specific lint errors, so a broken definition is never stored. Fails when a Power Shortcode with the same name already exists — returns {exists: true, name, current_code, current_description} so the agent can decide whether to edit it via edit-power-shortcode. |
wppilot/dynamic-shortcodes-edit-power-shortcodeEdit Power Shortcode | Edits an existing Power Shortcode by name. When a new code is provided it is syntax-checked (linted) before saving: invalid Dynamic Shortcode syntax is rejected with invalid_shortcode_syntax and the specific lint errors, leaving the stored definition untouched. Returns the previous code and description so the agent can diff. Fails with not_found when no Power Shortcode matches the name. |
wppilot/dynamic-shortcodes-evaluate-shortcodeEvaluate Shortcode | Evaluates a Dynamic Shortcode against the live WordPress environment and returns the real result. Optional post_id sets postdata before evaluation. If the shortcode demands the Power Shortcode privileged context, returns {requires_power: true, result: null} — the agent must then call create-power-shortcode to wrap it. |
Destructive
Marked destructive in the source, so each call needs an explicit confirmation flag, every time.
| Ability | What it does |
|---|---|
wppilot/dynamic-shortcodes-delete-power-shortcodeDelete Power Shortcode | Deletes a Power Shortcode by name. Returns the deleted code and description so the action is reversible by the agent. Returns not_found if no Power Shortcode matches. |