Update Comment Metadata


Sets a custom metadata key/value pair on a comment, given its comment ID, the meta_key, and the meta_value.

Property Value
Ability slug mosmcp/update-comment-meta
Wire tool name mosmcp__update-comment-meta
Category Comments (mosmcp-comments)
Plan Free

 

Required access

Requirement Value
Capability moderate_comments
Minimum default role Editor
Annotations readOnly: false · destructive: false · idempotent: true · openWorld: false

 

Input schema

Field Type Required Default Description
id integer (min 1) Yes — The comment ID (required).
meta_key string Yes — The meta key to set (required).
meta_value any Yes — The value to store (required).

 

Output schema

Field Type Required
id integer Yes
meta_key string Yes
updated boolean Yes

 

Example

Sample prompt
Tag comment 931 with a 'followed_up' note set to 'yes'.

Example request (json)

{
  "jsonrpc": "2.0",
  "id": 131,
  "method": "tools/call",
  "params": {
    "name": "mosmcp__update-comment-meta",
    "arguments": {
      "input": {
        "id": 931,
        "meta_key": "followed_up",
        "meta_value": "yes"
      }
    }
  }
}

Example response (json)

{
  "jsonrpc": "2.0",
  "id": 131,
  "result": {
    "isError": false,
    "structuredContent": {
      "id": 931,
      "meta_key": "followed_up",
      "updated": true
    }
  }
}

 

Edge cases / errors

  • No comment with that id → error mosmcp_comment_not_found.
  • meta_key empty after sanitize_key normalisation (lowercase a-z, 0-9, _, -) → error mosmcp_missing_meta_key; the returned meta_key shows the normalised key actually written.
  • An existing key is overwritten; updated is always true once the comment and key are valid, even if the value was unchanged.
  • meta_value may be any JSON type; arrays/objects are stored serialised by WordPress.

 


<< Previous Next >>
Unmark Comment as Spam Assign Terms To Custom Content

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.