Skip to main content
Glama

wp_update_page

Replace a PAGE/POST's content (refine/redesign in place). PREFER sections — the native Elementor CONTAINER (flexbox) spec so the page stays editable. Shape: [{direction:row|column, width:boxed|full, children:[{widthPercent, widgets:[{type,...}]}]}] (or widgets directly for one container). SECTION STYLING: a section/container accepts its OWN {bg:'#0E2F54' | {from,to,angle} gradient | {image:url} photo, overlay:{color,opacity} (over a bg image), shape:{type:'curve'|'waves'…,color,height} shape dividers, gap, min_height:'80vh', hidden:['mobile'], text_color, padding, radius, shadow, style:{…}} — bg colors the whole band and text_color propagates to child widgets. Full section vocabulary: wp_style_keys('container'); ready-made patterns: wp_section_recipes. Widget types: heading,text,button,image,icon-box,image-box,icon-list,counter,divider,spacer,testimonial,accordion,tabs,star-rating,gallery,image-carousel; Pro: form,price-table,call-to-action,testimonial-carousel (auto-downgraded to free composites if the site lacks Elementor Pro). Use elementor_search/elementor_get for exact widget fields. STYLING: every widget accepts a style object translated to NATIVE Elementor controls — {color, bg, align, fontSize, fontWeight, lineHeight, padding, margin, border:{width,color,radius,style}, shadow:{color,x,y,blur}, radius, tablet:{…}, mobile:{…}} — plus a raw settings passthrough. ANIMATION (just name a preset — no code): PREFER style.anim:'reveal' = scroll animation via the bundled GSAP runtime (presets: reveal, fade-up, stagger, parallax, zoom, pin, slide-left/right; optional {preset,delay,stagger}); put anim:{stagger:true} on a CONTAINER to cascade its children. It lazy-loads GSAP only where used, honors reduced-motion, and renders reliably (visible even if JS is slow). style.animate:'fade-up' = native Elementor entrance — needs no plugin but leaves the element elementor-invisible until Elementor's JS runs, so it can look blank in a render_screenshot; use it only for sites without the latest connector. BRAND TOKENS: if a Global Brand Kit is set, reference it instead of hardcoding — style.color:'@primary' (@secondary/@accent/@text/@bg/@border), style.bg:'@bg', and style.typographyToken:'h1' (h1–h6/body/small) or style.font:'@heading'/'@body'. These map to Elementor GLOBALS so one kit edit restyles the whole site — and it saves tokens vs re-sending hex/fonts. Call wp_get_brand_kit first for the available ids. NEVER generate custom CSS (custom_css is stripped) — native controls keep pages editable in Elementor's UI. html = single-piece escape hatch ONLY, never the whole page. EDITS A PAGE/POST ONLY — never a Theme Builder header/footer template or the site kit (those change every page). Round-trip validated, write-gated; review via render_screenshot before publishing.

Input Schema

NameRequiredDescriptionDefault
htmlNoLast resort: a self-contained HTML block for the whole page (not editable in Elementor)
titleNoOptional new page title
atomicNoEditor V4 ATOMIC spec (JSON array) for sites where Editor V4 is active: [{type: heading|paragraph|image|button|div|flex|grid|tabs, …}]; tabs = {type:"tabs", tabs:[{label, children:[…]}], active:0}. XeoRank emits valid V4 JSON (e-tabs/e-tabs-menu/e-tab/e-tabs-content-area/e-tab-content, typed envelopes, ids). wp_widget_schema("e-tabs") and wp_section_recipes("v4-tabs") show the shape. Raw elements also accepted via elementor_data/elements.
blocksNoGutenberg block markup (<!-- wp:… -->) — replaces post_content on a BLOCK or classic page. Read the current markup with wp_get_page(include_content=true), edit, send it back. Plugin transport. Refused with 409 on an Elementor-built page unless force_builder=true.
dry_runNoBuild + round-trip validate + return a preview (warnings, size) WITHOUT writing (no quota used)
post_idYesThe page/post ID to update (NOT a header/footer template or kit)
site_idYesThe WordPress site ID
sectionsNoPREFERRED: native Elementor CONTAINER spec — [{direction,width,children:[{widthPercent,widgets:[{type,...}]}]}]
force_builderNoWith `blocks`: allow converting an Elementor-built page to block content (deletes its Elementor data). Default false.
elementor_dataNoRaw _elementor_data JSON (advanced)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Goes well beyond the annotations: write-gating, round-trip validation, custom_css being stripped, Pro widgets auto-downgraded to free composites, GSAP lazy-loading with reduced-motion honored, the `elementor-invisible` pitfall of native entrance animations, and force_builder's deletion of Elementor data. Minor tension: "Replace ... content" is a full-overwrite operation while destructiveHint=false implies additive-only, but the mitigations (dry_run, preview-before-publish, validated writes) keep it defensible rather than a hard contradiction.

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

Conciseness3/5

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

Front-loaded correctly (purpose, then PREFERRED param), and the ALL-CAPS labels (SECTION STYLING, STYLING, ANIMATION, BRAND TOKENS) make it scannable, but the description is very long and re-states material already present in the parameter descriptions (html, sections, atomic, blocks, force_builder), so the density costs more than it should.

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

Completeness5/5

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

For a 10-parameter, no-output-schema write tool, an agent has everything needed: which parameter to choose, the accepted specs, styling/animation vocabulary, brand-kit workflow, the 409 refusal path, and the preview/verification loop. No output schema exists, so omitting return-value detail is appropriate.

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 description coverage is 100%, so baseline is 3; the description earns the bump by adding concrete shape and vocabulary the schema omits — container/section JSON layout, bg/gradient/overlay/shape divider keys, the style object and responsive breakpoints, anim presets, and brand-token syntax (@primary, typographyToken). It meaningfully disambiguates the four content paths (sections/blocks/atomic/html).

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

Purpose5/5

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

States a specific verb+resource+scope: "Replace a PAGE/POST's content (refine/design in place)", and explicitly fences the scope with "EDITS A PAGE/POST ONLY — never a Theme Builder header/footer template or the site kit". That exclusion alone separates it from template/kit siblings without opening a schema.

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

Usage Guidelines5/5

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

Gives explicit when-to-use and when-not: PREFER `sections`, `html` is a last-resort escape hatch and never the whole page, call wp_get_brand_kit first, use elementor_search/elementor_get for widget fields, use native `animate` only on sites lacking the latest connector, and review via render_screenshot before publishing. Alternatives (sections vs blocks vs atomic vs html) are all routed.

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.

Resources