Skip to main content
Glama

royal-mcp__wp_update_post_meta

Destructive

Update post meta. Value can be any JSON type (string, number, boolean, array, object). String values may contain safe HTML (same allow-list as post content — hook the royal_mcp_meta_value_sanitizer filter to customize per meta key). Arrays and objects are serialized by WordPress on write and returned as PHP arrays by wp_get_post_meta on read. Overwrites the existing row for this key (use wp_add_post_meta for multi-row keys). Response includes read-after-write verify (silent-drop error if the write did not persist; modified_by_wp diff if WP transformed the value) and a 7-day undo token that restores the prior value via mcp_undo_last_operation. Undo token omitted with a warnings entry if the prior value exceeds 1MB compressed (rare — SiteVault snapshot recommended for reversal in that case). Backslashes (JSON unicode escapes, embedded JSON-LD, Divi loop field bindings) are stored as sent. (site: demo.royalplugins.com) Through Royally: waits for a person to approve it in Royally; nothing on the site changes until then.

Input Schema

NameRequiredDescriptionDefault
keyYes
valueYesAny JSON value. Do not pass PHP-serialized strings (a:1:{...}) — pass the structured value directly.
post_idYes
site_idNoSite to run this tool on: 8ef2e52b-bd07-4671-a363-ebe8b480b65c (https://demo.royalplugins.com)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and idempotentHint=false, and the description reinforces rather than contradicts that by stating it overwrites the existing row. Beyond annotations it discloses read-after-write verification with silent-drop errors, modified_by_wp diffs, a 7-day undo token with a documented size cutoff, sanitizer filter behavior for HTML, and backslash preservation.

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?

The purpose is front-loaded in the first sentence and subsequent sentences each add distinct information about types, verification, undo, and approval. It is dense and long, with niche asides (Divi loop field bindings) and the critical approval caveat buried at the very end, but there is little pure padding.

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?

For a destructive write tool with no output schema, the description covers write semantics, value typing, sanitization, post-write verification, undo and its limits, and the approval-queue behavior. An agent has enough to call it correctly and understand what happens afterward.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 50% and 'key' and 'post_id' carry no schema descriptions, so the description must compensate. It does so substantively for 'value' (any JSON type, arrays/objects serialized on write and returned as PHP arrays on read, do not pass PHP-serialized strings, backslashes stored as sent) but leaves the meta key and post id unelaborated.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence gives a specific verb and resource (update post meta), and the description explicitly separates it from wp_add_post_meta for multi-row keys. It is clear what the tool does, though the terse first line leans on the following sentences to convey scope.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It names the alternative (wp_add_post_meta for multi-row keys), the reversal path (mcp_undo_last_operation), and a fallback (SiteVault snapshot) for the rare >1MB prior value that gets no undo token. It also flags that under Royally the write is queued for human approval and nothing changes until approved, which is essential routing information.

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