Skip to main content
Glama

wp_set_post_terms

Assign the specified term IDs to a post for a given taxonomy, replacing any existing terms. Use dry-run to preview changes before applying.

Instructions

Set a post's terms for one taxonomy - REPLACES them, never appends.

term_ids is the COMPLETE list the post should end up with (ids from wp_list_terms); anything not in it is unassigned, and an empty list clears the taxonomy on that post. Read the post's current terms first if you mean to add one. post_id comes from wp_find_page / wp_get_content. The write is verified against what the site reports it stored: WordPress silently drops ids the taxonomy does not own, and assigning a taxonomy that is not registered for that post's type stores NOTHING while still answering 200 - both come back as a TermAssignmentMismatch error rather than a false success. DEFAULTS TO dry_run=true (returns a preview; writes nothing). Pass dry_run=false to apply. Requires the REST transport. Prod writes require allow_prod=true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dry_runNo
installYes
post_idYes
taxonomyYes
term_idsYes
allow_prodNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.4.0

TDQS

A4.2/5.0
Behavior5/5

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

With no annotations, the description carries full transparency. It discloses replacement semantics, the verification of writes, error behavior on mismatched term IDs, the dry_run default, the need for REST transport, and prod write restrictions (allow_prod).

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

Conciseness3/5

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

The description is somewhat verbose and repetitive, with multiple caveats and instructions crammed into a single paragraph. It could be streamlined without losing key details, but the structure is still readable and logically ordered.

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?

Given the tool's complexity, the description covers major behaviors: replacement, error verification, dry_run, and prod safeguards. However, it omits explanation of the install and taxonomy parameters, which are part of the required input.

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?

The schema has 0% description coverage. The description explains term_ids (complete list, empty clears), post_id (from wp_find_page/wp_get_content), dry_run (default true), and allow_prod (required for prod). It does not explain install or taxonomy, leaving two parameters under-described.

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?

Clearly states the verb and resource: 'Set a post's terms for one taxonomy' and explicitly warns 'REPLACES them, never appends.' This distinguishes it from sibling tools like wp_list_terms or wp_create_term.

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?

Provides actionable guidance: 'Read the post's current terms first if you mean to add one' and explains the dry_run default and how to apply. It does not explicitly contrast with alternatives, but the replacement semantics make the appropriate usage clear.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ad02/wp-ops-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server