Skip to main content
Glama

royal-mcp__wp_add_post_meta

Destructive

Add a meta row without overwriting existing values under the same key. Use for keys that store multiple rows (e.g. tag one post with several IDs under the same key). Value can be any JSON type; string values may contain safe HTML (customize per key with royal_mcp_meta_value_sanitizer). Arrays and objects are serialized by WordPress. If unique=true and a row with this key already exists, the call returns created=false. 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.
uniqueNoIf true, fail (return created=false) when a row with this key already exists. Default false.
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?

Goes well beyond annotations: it discloses the input-customization hook (royal_mcp_meta_value_sanitizer), WordPress-side serialization of arrays/objects, backslash preservation for JSON-LD/Divi payloads, the unique=true failure mode returning created=false, and critically that execution is gated on human approval ('nothing on the site changes until then'). That pending-approval behavior is invisible in the annotations and materially changes how an agent should report results.

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?

Front-loaded with the differentiator, then progressively narrows to edge cases. The backslash parenthetical naming JSON unicode escapes, JSON-LD and Divi loop bindings is long and niche, but it is the kind of detail that prevents silent data corruption, so it mostly earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, and the description covers the failure return (created=false) but not the shape of a successful response (new row ID, slug, etc.), nor any capability/permission requirement for writing post meta. Otherwise complete for a five-parameter write tool, including the approval-queue caveat.

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 60%, with key and post_id undocumented in the schema; the description compensates by explaining key semantics (multi-row keys, per-key sanitizer) and value semantics (any JSON type, strings may contain safe HTML, arrays/objects serialized). post_id is left entirely unexplained, though its meaning is self-evident from the name.

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

Purpose5/5

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

States a specific verb and resource and immediately defines the differentiator versus the sibling update tool: 'Add a meta row without overwriting existing values under the same key.' The example ('tag one post with several IDs under the same key') makes the additive vs. overwrite distinction concrete, which is exactly the ambiguity an agent would have between wp_add_post_meta and wp_update_post_meta.

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

Usage Guidelines4/5

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

Gives a clear positive usage condition ('Use for keys that store multiple rows') and an example scenario, plus an in-tool alternative via the unique=true flag. It never names wp_update_post_meta as the mutually exclusive sibling, so the agent must infer the when-not-to-call from semantics rather than an explicit routing statement.

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