Get Comment Metadata
Returns custom metadata stored on a comment, given its comment ID. Pass meta_key for a single key, or omit it for all metadata. Read-only.
| Property | Value |
|---|---|
| Ability slug | mosmcp/get-comment-meta |
| Wire tool name | mosmcp__get-comment-meta |
| Category | Comments (mosmcp-comments) |
| Plan | Free |
Required access
| Requirement | Value |
|---|---|
| Capability | moderate_comments |
| Minimum default role | Editor |
| Annotations | readOnly: true · 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 | — | Optional. A single meta key to fetch. |
Output schema
| Field | Type | Required |
|---|---|---|
| id | integer | Yes |
| meta | object | Yes |
Example
Sample prompt
Show me the extra data stored on comment 931.
Example request (json)
{
"jsonrpc": "2.0",
"id": 117,
"method": "tools/call",
"params": {
"name": "mosmcp__get-comment-meta",
"arguments": {
"input": {
"id": 931
}
}
}
}Example response (json)
{
"jsonrpc": "2.0",
"id": 117,
"result": {
"isError": false,
"structuredContent": {
"id": 931,
"meta": {
"akismet_result": [
"false"
],
"rating": [
"5"
]
}
}
}
}
Edge cases / errors
- No comment with that id → error mosmcp_comment_not_found.
- Each key maps to an array of values (a key can hold several). With meta_key, only that key is returned; a key that doesn't exist comes back with an empty array.
- meta_key is normalised with WordPress sanitize_key (lowercased, only a-z, 0-9, _ and - kept) before the lookup.
- Comment with no metadata → meta is an empty object.
| << Previous | Next >> |
|---|---|
| Get Comment Count by User | Get Comments for 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.