Update Own Post
Edits the title, content and/or excerpt of a post authored by the current user. Cannot edit posts written by other users. Only the fields you pass are changed; the post keeps its current 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-own |
| Wire tool name | mosmcp__post-update-own |
| 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 for the post. Omit to keep the current title. | |
| content | string | — | New content for the post. 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 for the post. 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
Update the excerpt on my post 42 to 'A quick guide to our new features.'
Example request (json)
{
"jsonrpc": "2.0",
"id": 30,
"method": "tools/call",
"params": {
"name": "mosmcp__post-update-own",
"arguments": {
"input": {
"id": 42,
"excerpt": "A quick guide to our new features."
}
}
}
}Example response (json)
{
"jsonrpc": "2.0",
"id": 30,
"result": {
"isError": false,
"structuredContent": {
"id": 42,
"title": "New Features Guide",
"status": "draft",
"slug": "new-features-guide",
"modified": "2026-09-29 10:20:44",
"updated": [
"excerpt"
],
"warnings": [],
"edit_url": "https://example.com/wp-admin/post.php?post=42&action=edit",
"view_url": "https://example.com/?p=42",
"post_type": "post"
}
}
}
Edge cases / errors
- Post written by another user → refused with not_own_post, even if the caller could otherwise edit it.
- id not found or not a post → post_not_found.
- Nothing to change supplied → nothing_to_update; passing excerpt as an empty string clears the excerpt.
- Editing content on an Elementor-built post → saved with a content_hidden_by_elementor warning.
| << Previous | Next >> |
|---|---|
| Unpublish Post | Update Post |
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.