Skip to main content
Glama

Change a post or page

wp_update_post
Destructive

Update an existing post, page or entry of any post type; only the fields passed change. Returns {updated: true, post} with the entry's summary (the fields of wp_list_posts), plus builder_note where the new content shows but the page builder may replace it later. Needs the right to edit the entry; moving it to publish, private or future needs the right to publish. Changes to a published entry show on the site at once; a status change can publish an entry or take it off the site, and giving a trashed entry a status takes it out of the trash. For a revision id, WordPress stores custom fields (meta) on the post the revision belongs to. On a page whose page builder shows its own data, post_content is only a copy: a call with content is refused there before anything is written, with the way to make the change; a call without content still changes the other fields. wp_get_builder_layout returns the outline of such pages. An undo point keeps the previous values of the fields the call changes (title, content, excerpt, status, slug, parent, author, date; with the status also the date, since publishing an undated draft dates it), read just before the write; meta and terms are not part of it. The answer adds undo, the token for wp_undo (null when no snapshot could be taken). Page-builder data in "meta" (keys such as panels_data or dslc_code) takes the unfiltered_html capability, which on a multisite network only a super admin has; the keys are those of the core's list (filter ab_mcp_builder_markup_meta_keys) and of Pro's own (filter ab_mcp_pro_markup_meta_keys), and without the capability the call is refused before anything is written. Forwarded by AlphaBridge Connect to the one site this connection reaches.

Input Schema

NameRequiredDescriptionDefault
idYesPost id.
dateNoNew publish date. Site time as "Y-m-d H:i:s" (or "Y-m-d H:i", "Y-m-d"), or RFC 3339 with an offset, the form of the dates this plugin returns, e.g. "2026-10-02T09:00:00+02:00". Times that do not exist in the site's timezone (clocks skip them) are refused, as is a time where the clocks go back that WordPress would read as the other of the two. A date alone never changes the status: a save that would publish the post or take it off the site is refused unless that status is passed as well, and a post is scheduled only for a date at least five minutes ahead.
metaNoKey/value custom fields to set. Keys are stored as sanitize_key() writes them (lower case; letters, digits, _ and -). Keys starting with "_", protected or credential-like keys and keys the account may not edit are skipped without an error. Page-builder data (keys such as panels_data, dslc_code or pagelayer-data; filter ab_mcp_builder_markup_meta_keys) takes the unfiltered_html capability, which on a multisite network only a super admin has; without it the call is refused before anything is written.
slugNoNew URL slug; it changes the permalink where the permalink structure uses slugs. When omitted, it stays as it is.
termsNoTaxonomy => array of term ids or names, e.g. {"post_tag":["News"]}. Replaces the post's terms in each taxonomy given; other taxonomies keep theirs. A name that does not exist yet is created where the account may manage the taxonomy's terms, else left out; unknown taxonomies and taxonomies the account may not assign are skipped without an error.
titleNoNew title. When omitted, it stays as it is.
authorNoNew author user id. Applied only for an account that may edit others' entries of this type; otherwise left as it is.
parentNoNew parent post id; 0 for none. When omitted, it stays as it is.
statusNodraft, publish, pending, private, future. "future" needs a date at least five minutes ahead. When omitted, the status stays; on a trashed entry any of these takes it out of the trash.
contentNoNew content (HTML or block markup); it replaces the whole post_content. When omitted, it stays as it is.
excerptNoNew excerpt. When omitted, it stays as it is.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changed
    • addedInput schema / properties / author / description
      Added value: +"New author user id. Applied only for an account that may edit others' entries of this type; otherwise left as it is."
    • addedInput schema / properties / content / description
      Added value: +"New content (HTML or block markup); it replaces the whole post_content. When omitted, it stays as it is."
    • addedInput schema / properties / excerpt / description
      Added value: +"New excerpt. When omitted, it stays as it is."
    • changedInput schema / properties / meta / description
      Previous value: -"Key/value meta to set. Page-builder data (keys such as panels_data, dslc_code or pagelayer-data; filter ab_mcp_builder_markup_meta_keys) takes the unfiltered_html capability, which on a multisite network only a super admin has; without it the call is refused before anything is written."New value: +"Key/value custom fields to set. Keys are stored as sanitize_key() writes them (lower case; letters, digits, _ and -). Keys starting with \"_\", protected or credential-like keys and keys the account may not edit are skipped without an error. Page-builder data (keys such as panels_data, dslc_code or pagelayer-data; filter ab_mcp_builder_markup_meta_keys) takes the unfiltered_html capability, which on a multisite network only a super admin has; without it the call is refused before anything is written."
    • addedInput schema / properties / parent / description
      Added value: +"New parent post id; 0 for none. When omitted, it stays as it is."
    • addedInput schema / properties / slug / description
      Added value: +"New URL slug; it changes the permalink where the permalink structure uses slugs. When omitted, it stays as it is."
    • changedInput schema / properties / status / description
      Previous value: -"draft, publish, pending, private, future. \"future\" needs a date at least five minutes ahead."New value: +"draft, publish, pending, private, future. \"future\" needs a date at least five minutes ahead. When omitted, the status stays; on a trashed entry any of these takes it out of the trash."
    • addedInput schema / properties / terms / description
      Added value: +"Taxonomy => array of term ids or names, e.g. {\"post_tag\":[\"News\"]}. Replaces the post's terms in each taxonomy given; other taxonomies keep theirs. A name that does not exist yet is created where the account may manage the taxonomy's terms, else left out; unknown taxonomies and taxonomies the account may not assign are skipped without an error."
    • addedInput schema / properties / title / description
      Added value: +"New title. When omitted, it stays as it is."
  2. Added

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the destructive/openWorld annotations: publishes take effect immediately, status changes can take an entry off the site or out of the trash, builder-page content writes are refused before any write, page-builder meta keys require unfiltered_html, and the undo snapshot's exact field coverage (and its exclusion of meta and terms) is spelled out.

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 with purpose, but the body is one dense run-on paragraph with nested parentheticals (undo coverage, multisite super-admin caveat, revision/meta caveat) that makes it hard to scan. The content mostly earns its place; the packaging does not.

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?

With no output schema, the description still documents the return shape ({updated: true, post} summary plus builder_note and the undo token, null when no snapshot exists), so an agent knows exactly what comes back and how to call wp_undo afterward.

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

Parameters3/5

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

Schema description coverage is 100%, so the baseline is 3; the description mostly restates schema content (builder meta keys, date/status rules). It does add that only title/content/excerpt/status/slug/parent/author/date enter the undo snapshot while meta and terms do not, which is real extra meaning, but not enough to lift it above the baseline.

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 and resource ('Update an existing post, page or entry of any post type') plus the scoping rule 'only the fields passed change', which distinguishes it from the sibling wp_update_post_meta and from wp_create_post. It also names wp_get_builder_layout and wp_undo as the tools that pair with it.

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

Usage Guidelines4/5

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

Gives concrete when-to-use conditions: needs edit rights, needs publish rights for publish/private/future, a content call on a builder-backed page is refused and wp_get_builder_layout is the way to inspect it. It does not explicitly route meta-only edits to wp_update_post_meta or discuss wp_create_post vs update, so the alternative-mapping is incomplete.

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