Skip to main content
Glama

Frontman for WordPress

wp_create_widget

Destructive

Creates a text, custom_html, or block widget in a sidebar. Text widgets accept title/text strings and filter/visual booleans; custom_html accepts title/content strings; block requires a content string containing complete block markup. HTML follows WordPress permissions. Read back and verify the rendered page.

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": {
      "site_id": "<site_id>",
      "sidebar_id": "<sidebar_id>",
      "widget_base": "<widget_base>",
      "settings": "<settings>"
    },
    "name": "wp_create_widget"
  }
}

Input Schema

NameRequiredDescriptionDefault
site_idYesThe connected site's id returned by list_sites. Call list_sites first; do not use a URL or WordPress post ID.
positionNoOptional 1-based insertion position.
settingsYesJSON-encoded object of widget settings.
sidebar_idYesThe sidebar/widget area ID.
widget_baseYesThe widget base ID: text, custom_html, or block.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare the write, destructive, open-world, non-idempotent profile, and the description adds real context on top: HTML is subject to WordPress capability filtering and the change should be verified by reading back the rendered page. It does not explain why a create is flagged destructive (e.g. position displacement or settings overwrite) or what is returned, which is the main remaining gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four sentences, front-loaded with the action and the widget variants, then the payload rules, then the verification step; each sentence carries distinct information. 'HTML follows WordPress permissions' is terse to the point of ambiguity, which keeps it from a 5.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 4-required-parameter mutation with no output schema, the description covers payload shapes, the auth caveat, and a verification workflow. It still leaves gaps on what happens to existing widgets at the insertion point, whether retrying is safe given non-idempotency, and what a successful response contains — the read-back advice partially compensates for the last one.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description goes further by spelling out the settings payload shape per widget_base (title/text with filter/visual booleans, title/content for custom_html, full block markup for block) — information the schema does not carry. It adds nothing about position or sidebar_id beyond the schema fields.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Creates a ... widget in a sidebar') plus the three supported widget bases, so the agent knows exactly what gets created. It does not explicitly contrast with wp_update_widget or wp_read_widget, but the create-vs-modify distinction is inherent in the verb.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The per-type settings guidance implicitly tells the agent which widget_base to pick for a given payload, and 'Read back and verify the rendered page' prescribes a post-call step. There is no explicit when-to-use / when-not-to-use statement or routing to wp_update_widget for existing widgets.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.