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, and undo. 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.

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": {
      "id": "<id>"
    },
    "name": "wp_update_post"
  }
}

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; a taxonomy whose list holds a term the account may not assign (assign_term) keeps its terms; 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. Changed1 schema field changed
    • changedInput schema / properties / terms / description
      Previous 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."New 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; a taxonomy whose list holds a term the account may not assign (assign_term) keeps its terms; unknown taxonomies and taxonomies the account may not assign are skipped without an error."
  2. 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."
  3. Added

TDQS

A4.4/5.0
Behavior5/5

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

Goes far beyond the annotations: edit/publish capability requirements, immediate visibility of published changes, trash exit on status change, revision-id meta redirection to the parent post, builder-page refusal before any write, the unfiltered_html requirement for markup meta keys, and exactly what the undo snapshot covers and excludes (meta and terms excluded). This is exceptional disclosure for a destructive mutation.

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?

Front-loaded with purpose and partial-update semantics, and almost every sentence carries real operational information. It is dense and slightly repetitive — the unfiltered_html / builder meta key rule appears both in the prose and in the meta parameter — and the connection-forwarding note is buried at the end.

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 supplies the return shape ({updated, post}, builder_note, undo), covers permissions, builder-page edge cases, revision handling, and undo scope. For an 11-parameter destructive tool, an agent has everything needed to call it correctly.

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 coverage is 100%, so the per-field descriptions already carry the parameter semantics and the description largely restates them. What it adds is cross-field context (status changes can publish or unpublish; the undo snapshot's field list), which is useful but not required to invoke a parameter correctly.

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?

Opens with a specific verb and resource: 'Update an existing post, page or entry of any post type; only the fields passed change.' That partial-update semantics plus the sibling set (wp_create_post, wp_update_post_meta, wp_update_builder_element) makes it unambiguous which tool to pick.

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?

It names concrete alternatives and conditions: wp_get_builder_layout for page-builder outlines, wp_undo for the returned undo token, and a clear 'call with content is refused' rule for builder-managed pages. It doesn't explicitly exclude overlapping siblings like wp_bulk_update_status or wp_update_post_meta for pure meta edits, so it stops short of full routing guidance.

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