Skip to main content
Glama

Change a term

wp_update_term
Destructive

Change the name, slug, description or parent of an existing term; term_id and taxonomy identify it. Only the fields passed change, the others keep their values. Returns {updated: true, term_id}; an unknown term returns an error. Needs the taxonomy's right to edit terms (for categories and tags: manage_categories). Where the permalink structure uses slugs, a new slug changes the URL of the term's archive, and WordPress does not redirect the old one. The term's custom meta is not changed here. Forwarded by AlphaBridge Connect to the one site this connection reaches.

Input Schema

NameRequiredDescriptionDefault
nameNoNew display name. When omitted, it stays as it is; an empty name is refused.
slugNoNew URL slug. When omitted, it stays as it is; an empty string derives it from the name, made unique if taken. A slug another term of the taxonomy uses is refused, unless parent changes in the same call (WordPress then makes it unique).
parentNoId of the new parent term; 0 moves the term to the top level. A parent that does not exist is refused. When omitted, it stays as it is.
term_idYesId of the term to change, as wp_list_terms or wp_get_term return it.
taxonomyYesTaxonomy the term belongs to, e.g. "category" or "post_tag".
descriptionNoNew description; an empty string clears it. When omitted, it stays as it is.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • addedInput schema / properties / description / description
      Added value: +"New description; an empty string clears it. When omitted, it stays as it is."
    • addedInput schema / properties / name / description
      Added value: +"New display name. When omitted, it stays as it is; an empty name is refused."
    • addedInput schema / properties / parent / description
      Added value: +"Id of the new parent term; 0 moves the term to the top level. A parent that does not exist is refused. When omitted, it stays as it is."
    • addedInput schema / properties / slug / description
      Added value: +"New URL slug. When omitted, it stays as it is; an empty string derives it from the name, made unique if taken. A slug another term of the taxonomy uses is refused, unless parent changes in the same call (WordPress then makes it unique)."
    • addedInput schema / properties / taxonomy / description
      Added value: +"Taxonomy the term belongs to, e.g. \"category\" or \"post_tag\"."
    • addedInput schema / properties / term_id / description
      Added value: +"Id of the term to change, as wp_list_terms or wp_get_term return it."
  2. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare the mutation profile (readOnly=false, destructive=true, idempotent=false, openWorld=true), and the description adds genuinely non-structured context: only supplied fields are written, the return payload {updated: true, term_id}, error on unknown term, and the fact that a slug change alters the archive URL with no redirect. That last point is the strongest addition for a destructive-hinted tool.

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 verb and field set, then ordered by increasing subtlety: return value, permissions, URL side effect, meta exclusion. Dense but every sentence carries information; the trailing bridge/forwarding sentence is context rather than tool semantics.

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 still documents the return shape and the error case, plus permissions, side effects, and scope exclusions. For a 6-parameter mutation tool with high schema coverage, nothing an agent needs in order to call it correctly is missing.

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% and each parameter already documents its 'when omitted it stays as it is' behavior, the empty-slug derivation, and the parent/slug uniqueness interaction. The description's 'Only the fields passed change' is a useful aggregate restatement but adds little beyond what the schema already spells out in detail.

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 ('Change') plus the resource and the exact field set it touches (name, slug, description, parent), and identifies the two keys that address the term. It also carves out what it does not do ('The term's custom meta is not changed here'), which separates it from wp_update_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 clear context for use: partial-update semantics, the required capability (manage_categories for categories/tags), and the behavioral consequence of changing a slug. It never explicitly names alternatives such as wp_create_term or wp_delete_term, so the sibling routing is implied rather than stated.

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