Skip to main content
Glama

Set post meta

wp_update_post_meta
Destructive

Create or overwrite one meta value of a post: every stored value of the key is replaced, so a repeated call leaves the same state. Takes id, key and value (any JSON value; an array or object is stored as a serialized array); the key is stored lower-cased (sanitize_key). Refused: keys starting with "_", credential-like keys and keys the account may not edit. Page-builder data — keys such as panels_data, dslc_code, pagelayer-data, brizy, mfn-page-items or tve_updated_post (filter ab_mcp_pro_markup_meta_keys) — takes the unfiltered_html capability, which on a multisite network only a super admin has; the texts of page-builder pages change with wp_update_builder_element. The value is stored as given, backslashes included (\u0026 in block JSON stays \u0026). Returns updated, id and key; an unknown post is a not-found error. Needs edit_posts and the right to edit the post; no undo point is recorded. wp_get_post_meta reads the value; wp_update_post sets several keys through its meta field. Forwarded by AlphaBridge Connect to the one site this connection reaches.

Input Schema

NameRequiredDescriptionDefault
idYesPost id.
keyYesMeta key; stored lower-cased (sanitize_key).
valueNoAny JSON value; an array or object is stored serialized. Omitted: an empty string.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / id / description
      Added value: +"Post id."
    • addedInput schema / properties / key / description
      Added value: +"Meta key; stored lower-cased (sanitize_key)."
    • changedInput schema / properties / value / description
      Previous value: -"Any JSON value."New value: +"Any JSON value; an array or object is stored serialized. Omitted: an empty string."
  2. Added

TDQS

A4.4/5.0
Behavior4/5

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

Adds a great deal beyond the annotations: permission requirements (edit_posts plus edit rights on the post), the unfiltered_html / super-admin requirement for page-builder keys, the ab_mcp_pro_markup_meta_keys filter, sanitize_key lower-casing, backslash passthrough, that no undo point is recorded, and the returned fields (updated, id, key) with a not-found error case. One tension: "a repeated call leaves the same state" reads as idempotent while idempotentHint=false; the description's claim is scoped to stored state, so this is defensible but slightly muddying.

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?

Dense but front-loaded: the core overwrite semantics and the parameter contract come first, followed by refusals, capability requirements, and sibling alternatives. Every clause carries operative information (no filler), though the single long paragraph is heavier than necessary for a 3-parameter tool.

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?

With no output schema and no annotation coverage of permissions or value handling, the description fills the gaps: return fields, not-found error, auth requirements, refusal rules, and storage quirks. An agent has everything needed to call this correctly and predict consequences.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents id, key and value. The description largely restates those (lower-cased key, arrays/objects stored serialized, omitted value becomes empty string), adding only the serialization consequence and the backslash-preservation note, which is modest added meaning over a complete schema.

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?

Opens with a precise verb+resource+scope: "Create or overwrite one meta value of a post," and immediately distinguishes itself from siblings by naming wp_get_post_meta (reads) and wp_update_post (sets several keys via its meta field). The replace-all-values semantics are stated explicitly, so an agent knows exactly what this does versus related tools.

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?

Explicitly routes to alternatives: use wp_get_post_meta to read, wp_update_post to set several keys at once, and wp_update_builder_element when the target is page-builder text. It also states what the tool refuses (underscore-prefixed, credential-like, non-editable keys), which is a de facto when-not-to-use list.

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