Skip to main content
Glama

Update HTML Widget

elementor_update_html_widget
Idempotent

Update an Elementor HTML widget's content while safely handling script tags, quotes, and special characters via base64 encoding; optionally set custom CSS.

Instructions

Update an HTML widget's content. Safely handles HTML containing tags, quotes, and special characters via base64 encoding. Optionally update custom CSS too.

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>",
      "elementId": "<elementId>",
      "htmlContent": "<htmlContent>"
    },
    "name": "elementor_update_html_widget"
  }
}

Input Schema

NameRequiredDescriptionDefault
postIdYesWordPress post/page ID
customCssNoOptional custom CSS to set on the widget
elementIdYesElementor element ID of the HTML widget
htmlContentYesNew HTML content for the widget

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.0.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly=false, idempotent=true, and destructive=false, so the safety profile is covered. The description adds genuinely new behavioral context: script tags, quotes, and special characters are handled safely via base64 encoding, which tells the agent it need not pre-escape content. It omits what happens to existing CSS when customCss is not supplied.

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

Conciseness5/5

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

Three short sentences, front-loaded with the core action, then the non-obvious encoding behavior, then the optional CSS. No filler or redundancy.

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

Completeness4/5

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

For a simple four-parameter mutation with a fully documented schema and no output schema, the description covers the risky part (HTML encoding) well. The main remaining gap is replace-vs-append semantics for htmlContent and the effect of omitting customCss.

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 earns a bump by explaining how htmlContent is transmitted (base64 encoding to survive script tags and quotes) and by flagging customCss as optional. It does not clarify whether htmlContent replaces or appends to existing widget content.

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?

The description gives a specific verb and resource ('Update an HTML widget's content') plus a secondary capability (custom CSS), which is enough to distinguish it from general element mutation tools. It stops short of explicitly contrasting with siblings like elementor_update_element, so the differentiation is inferred rather than stated.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no prerequisites (e.g., whether the widget must already exist or be of HTML type), and no mention of alternatives such as elementor_update_element for non-HTML widgets. The agent must infer the usage context from the name alone.

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