Skip to main content
Glama

Set term meta

wp_update_term_meta
Destructive

Create or overwrite one meta value of a term (category, tag or any taxonomy); all stored values of the key are replaced. Keys starting with "_" and credential-like keys are refused. Needs manage_categories and the right to edit this term's meta. WordPress strips backslashes from the value. Returns updated, term_id and key; an unknown term is a not-found error. No undo point is recorded; the term's name, slug and description change with wp_update_term. Forwarded by AlphaBridge Connect to the one site this connection reaches.

Input Schema

NameRequiredDescriptionDefault
keyYesMeta key; stored lower-cased with characters other than a-z, 0-9, "_" and "-" removed (sanitize_key).
valueNoScalar or array of scalars (arrays may nest); an array is stored serialized. Omitted: an empty string.
term_idYesTerm id, as wp_list_terms returns it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / key / description
      Added value: +"Meta key; stored lower-cased with characters other than a-z, 0-9, \"_\" and \"-\" removed (sanitize_key)."
    • addedInput schema / properties / term_id / description
      Added value: +"Term id, as wp_list_terms returns it."
    • changedInput schema / properties / value / description
      Previous value: -"Scalar or array of scalars."New value: +"Scalar or array of scalars (arrays may nest); an array is stored serialized. Omitted: an empty string."
  2. Added

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations: discloses that all stored values for the key are replaced, that keys beginning with "_" and credential-like keys are refused, the manage_categories permission requirement, backslash stripping by WordPress, the returned fields, the not-found error for unknown terms, and that no undo point is recorded. This is consistent with destructiveHint=true and idempotentHint=false rather than contradicting them.

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-loads the purpose in the first clause and then packs constraints, permissions, return shape and side effects into a few dense sentences with no filler. The second half is quite long per sentence, which costs a little readability but every clause carries information.

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, the description supplies the return shape (updated, term_id, key), the error case, the permission prerequisite and the irreversible-overwrite warning. Combined with a fully documented schema, an agent has everything needed to decide and call correctly.

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 100%, so the baseline is 3, but the description adds real semantics: replacement rather than append behavior for the key, and a hard refusal rule for "_"-prefixed and credential-like keys that the schema does not mention. Default-value and sanitization details are left to the schema, which is fine.

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 ("Create or overwrite one meta value of a term") and immediately scopes the resource to categories, tags or any taxonomy. It is clearly distinguishable from wp_update_term (name/slug/description), which the description explicitly names, and from read-side siblings like wp_get_term_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 usage context (writing a term meta value) and implicitly routes elsewhere by noting that name, slug and description changes belong to wp_update_term. It does not explicitly name a read sibling such as wp_get_term_meta or state when a different meta-writing tool (wp_update_post_meta / wp_update_user_meta) applies, so it stops short of a full when/when-not 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