Update Post


Edits the title, content and/or excerpt of any post the current user has permission to edit, including posts written by other authors. Does not change the post status. If the post is built with Elementor, what visitors read comes from the Elementor layout rather than from this content, so change the text on the Elementor elements instead. This replaces a whole field with the text you supply. To change only part of the text, use mosmcp/content-replace-in-post instead: it is far cheaper on a long page and cannot lose formatting, shortcodes or block markup the way rewriting the whole field can.

Property Value
Ability slug mosmcp/post-update
Wire tool name mosmcp__post-update
Category Posts (mosmcp-posts)
Plan Free

 

Required access

Requirement Value
Capability edit_post (checked against the specific post)
Minimum default role Contributor
Annotations readOnly: false · destructive: false · idempotent: false · openWorld: true

 

Input schema

Field Type Required Default Description
id integer (min 1) Yes — The ID of the post to update.
title string — New title. Omit to keep the current title.
content string — New content. Omit to keep the current content. HTML is saved the way the WordPress editor saves it: a user with the unfiltered_html capability can save any markup, including forms, scripts and styles, and markup a user is not allowed to save is refused with the reason rather than silently removed. Backslashes are kept. On sites that use the block editor, write it as block markup, the format the editor saves (for example <!-- wp:heading --><h2 class="wp-block-heading">Title</h2><!-- /wp:heading --> then <!-- wp:paragraph --><p>Text</p><!-- /wp:paragraph -->), so each heading, paragraph or button can be edited on its own later. Plain HTML is saved as one "Classic" block. For a new page it is often simplest to create it with a title only and add the content with mosmcp/block-insert, which builds the blocks for you.
excerpt string — New excerpt. Omit to keep the current excerpt; pass an empty string to clear it.
slug string — New URL slug. Omit to leave the address unchanged. Reduced to a URL-safe form, and a suffix is added if it is already taken.

 

Output schema

Field Type Required Description
id integer Yes
title string Yes
status string Yes
slug string The URL slug as stored, which may differ from a requested one.
modified string
updated string[] Fields that were changed.
warnings object[] Notes about the update, such as the content not being visible because Elementor renders this post.
warnings[].code string
warnings[].message string
warnings[].context string
edit_url string
view_url string
post_type string

 

Example

Sample prompt
Change the title of post 42 to 'Our 2026 Product Roadmap'.

Example request (json)

{
  "jsonrpc": "2.0",
  "id": 31,
  "method": "tools/call",
  "params": {
    "name": "mosmcp__post-update",
    "arguments": {
      "input": {
        "id": 42,
        "title": "Our 2026 Product Roadmap"
      }
    }
  }
}

Example response (json)

{
  "jsonrpc": "2.0",
  "id": 31,
  "result": {
    "isError": false,
    "structuredContent": {
      "id": 42,
      "title": "Our 2026 Product Roadmap",
      "status": "publish",
      "slug": "product-roadmap",
      "modified": "2026-09-29 10:15:02",
      "updated": [
        "title"
      ],
      "warnings": [],
      "edit_url": "https://example.com/wp-admin/post.php?post=42&action=edit",
      "view_url": "https://example.com/product-roadmap/",
      "post_type": "post"
    }
  }
}

 

Edge cases / errors

  • id that is not a post (e.g. a page) → post_not_found.
  • No title, content, excerpt or slug supplied (or only a blank title) → refused with nothing_to_update.
  • Changing content on a post built with Elementor → saved, but a content_hidden_by_elementor warning says visitors will still see the Elementor layout.
  • Changing slug on a published post → a published_url_changed warning (WordPress keeps a redirect from the old address); a taken slug gets a suffix and a slug_adjusted_for_uniqueness warning.

 


<< Previous Next >>
Update Own Post Create Draft Page

For more information about the Secure MCP Server for WordPress plugin, explore the following resources:

Product Overview | Pricing | Try for Free | Documentation

If you have any questions regarding plugin configuration, pricing plans or licensing, please contact us or mail us at aisupport@xecurify.com.