Skip to main content
Glama

Create a term

create_term

Create a new category, tag, or custom taxonomy term in a WordPress site. Avoid duplicate-name rejections by listing existing terms before adding.

Instructions

Create a term in any taxonomy. If a term with the same name already exists, WordPress rejects it — search with list_terms first when you might be duplicating.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
metaNoTerm meta, for keys registered with show_in_rest.
nameYesDisplay name of the term.
slugNoURL slug. Derived from the name if omitted.
parentNoParent term ID. Hierarchical taxonomies only — passing this on a flat taxonomy such as tags is an error.
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.
taxonomyNoTaxonomy to create the term in.category
descriptionNoLonger descriptive text.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 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 / meta / propertyNames
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / parent / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / parent / minimum
      Added value: +-9007199254740991
  2. First observedv1.0.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already indicate this is a non-read-only, non-idempotent, non-destructive operation. The description adds valuable behavioral context: it warns that WordPress rejects duplicates, which is a key behavior. It also implicitly notes that list_terms is a safer alternative for reading. This goes beyond annotations to inform the agent of a non-obvious behavior (rejection on duplicate) that affects decision-making.

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?

The description is two sentences: the first states the core purpose, and the second provides critical pre-call guidance. It is front-loaded with the primary verb and resource, then adds a caution. It is concise with no fluff, but could be slightly more structured (e.g., separate 'When to use' from 'What it does'), but the current structure is efficient and informative.

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?

Given the tool's moderate complexity (7 params, 1 required), the schema covers all parameters, and the description adds the critical duplicate-rejection context. The annotations cover read/write characteristics. The description is sufficient for an agent to call the tool correctly, including the need to pre-check for duplicates. It is complete for the intended use.

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 description coverage is 100% for parameters, so the schema already documents each parameter. However, the description adds important semantic context for the 'name' parameter by highlighting the uniqueness constraint, which affects how the 'name' parameter should be chosen. It also mentions the 'parent' parameter's restriction to hierarchical taxonomies (in the schema) but the description reinforces the overall creation context. The description goes beyond schema by explaining the duplicate-rejection behavior that depends on the 'name' value.

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 clearly states the action ('Create a term') and the resource ('in any taxonomy'), with an explicit caveat about duplicate names. It distinguishes itself from sibling tools by naming the alternative (list_terms) and the condition for using it, which helps an agent identify when to use create_term versus searching first.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states when to use this tool ('search with list_terms first when you might be duplicating') and implies the alternative tool (list_terms). This gives clear usage guidance, including a caution about potential rejection. This is a strong example of when-to-use guidance.

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