Skip to main content
Glama

Change a term

wp_update_term
Destructive

Modify an existing taxonomy term’s name, slug, description, or parent by term ID and taxonomy, changing only supplied fields and returning updated status or an error for unknown terms.

Instructions

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) and the right to edit this term (edit_term), which a site can withhold for single terms. 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.

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. First observedv4.7.0

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses the return payload, the error on unknown term, the two required capabilities (including per-term edit_term that a site can withhold), the URL/permalink side effect with no redirect, and that custom meta is untouched. For a destructive, non-idempotent mutation this is exactly the context an agent needs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Five tight sentences, front-loaded with the action and the partial-update rule, then consequences and permissions. No sentence is redundant and each carries distinct 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?

Covers the mutation contract, return value, error behavior, permission requirements and a notable side effect (slug changing the archive URL without redirect) despite there being no output schema. An agent has everything needed to call this correctly and anticipate failure modes.

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 the schema alone doesn't foreground, notably the partial-update rule and the interaction between slug and parent. The field-by-field edge cases live in the schema, which is fine, so a 4 is warranted rather than higher.

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 (change/update an existing term) and enumerates exactly which fields it can change: name, slug, description, parent. The phrase 'existing term; term_id and taxonomy identify it' cleanly separates it from wp_create_term and wp_delete_term without needing to name them.

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?

Explains the partial-update contract ('only the fields passed change, the others keep their values') and the permission preconditions, which tells an agent when the call will succeed. It does not explicitly route to sibling alternatives such as wp_create_term for new terms, so it falls short of the explicit alternatives bar.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools