Skip to main content
Glama

Assign terms to content

assign_terms_to_content

Assign taxonomy terms to WordPress content by ID or name, auto-creating missing terms. Replace, add, or remove terms with a simple mode option.

Instructions

Assign taxonomy terms to any content item. Terms may be given as IDs or as names — names that do not exist are created for you. By default this replaces the item's terms in that taxonomy; pass mode: "add" to keep the existing ones, or "remove" to detach.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoreplace: these become the only terms. add: keep existing and add these. remove: detach these.replace
typeNoContent type of that ID.post
termsYesTerm IDs, or names — unknown names are created.
site_idNoWhich configured WordPress site to act on. Optional — with a single site configured it is used automatically; with several, the default site is used unless you name one. Run list_sites for valid ids.
taxonomyYesTaxonomy to assign within (category, post_tag, or a custom one).
content_idYesThe content item to modify.
create_missingNoCreate terms given by name that do not exist yet.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv2.0.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / content_id / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / content_id / minimum
      Added value: +-9007199254740991
  2. First observedv1.0.0

TDQS

A3.5/5.0
Behavior1/5

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

The description reveals that the default mode 'replaces the item's terms' and that 'remove' detaches terms, both of which are destructive actions. However, the annotations declare destructiveHint: false, which contradicts the described behavior. Per the rubric, a description that contradicts annotations receives a 1.

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?

The description is two sentences, front-loads the main action, and includes the most important behavioral nuance (default replace) without any filler. Every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the core operation and mode semantics, but with no output schema and 7 parameters, it omits information about return values and potential side effects beyond the annotation conflict. It is adequate but not fully complete for a tool with this complexity.

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 baseline is 3. The description restates what the schema already says about modes and term creation (e.g., 'names that do not exist are created for you') without adding new parameter-level meaning.

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?

The description states a specific action ('Assign taxonomy terms to any content item') with a clear resource and additional detail about modes. It clearly distinguishes from sibling tools like get_content_terms (which retrieves) and create_term (which creates standalone terms).

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?

The description explains when to use different modes (replace, add, remove) and mentions auto-creation of unknown names. It does not explicitly name alternatives like create_term or get_content_terms, but the mode guidance gives strong practical usage context.

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