Skip to main content
Glama

woo_create_attribute

Create a global WooCommerce product attribute taxonomy (pa_{slug}) for a site so products can reuse shared attribute terms; set name, slug, type, sort order, and archives.

Instructions

Create a global product attribute (taxonomy pa_{slug})

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "site": "<site>",
      "name": "<name>"
    },
    "name": "woo_create_attribute"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesAttribute name (label)
siteYesSite id (see list_sites)
slugNoSlug, max 28 chars (default: derived from name)
typeNoAttribute type (default "select"; plugins may add others)
order_byNoDefault term sort order (default menu_order)
has_archivesNoEnable archive pages for terms (default false)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changedv3.14.0
    • removedInput schema / properties / has_archives / default
      Removed value: -false
    • addedInput schema / properties / has_archives / description
      Added value: +"Enable archive pages for terms (default false)"
    • changedInput schema / properties / name / description
      Previous value: -"Attribute name"New value: +"Attribute name (label)"
    • removedInput schema / properties / order_by / default
      Removed value: -"menu_order"
    • addedInput schema / properties / order_by / description
      Added value: +"Default term sort order (default menu_order)"
    • addedInput schema / properties / order_by / enum
      Added value: +[
      +  "menu_order",
      +  "name",
      +  "name_num",
      +  "id"
      +]
    • removedInput schema / properties / slug / default
      Removed value: -""
    • addedInput schema / properties / slug / description
      Added value: +"Slug, max 28 chars (default: derived from name)"
    • removedInput schema / properties / type / default
      Removed value: -"select"
    • addedInput schema / properties / type / description
      Added value: +"Attribute type (default \"select\"; plugins may add others)"
  2. Changed2 schema fields changedv3.4.0
    • addedInput schema / properties / site
      Added value: +{
      +  "description": "Site id (see list_sites)",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "name"
      -]New value: +[
      +  "site",
      +  "name"
      +]
  3. First observedv2.0.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; it does disclose the non-obvious behavior that this creates a WordPress taxonomy named pa_{slug}, which is real added context. It says nothing about permission requirements, failure on duplicate slug/name, or whether the operation is idempotent.

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?

A single short sentence, front-loaded with the verb and resource, with the parenthetical technical detail earning its place. Nothing wasted, though it is arguably terse to the point of under-specification.

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

Completeness2/5

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

For a six-parameter create tool with no annotations and no output schema, the description omits what is needed after creation, notably the new attribute's id/slug required to then call woo_create_attribute_term. Duplicate-handling and prerequisite context are also absent.

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, and the description adds meaning by tying the slug parameter to the generated taxonomy key pa_{slug}. The remaining parameters (type, order_by, has_archives) are left entirely to the schema, which already documents them well.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Create a global product attribute') and adds a concrete technical detail, the underlying taxonomy name pa_{slug}. It distinguishes itself implicitly from woo_create_attribute_term, though it never names that sibling as the alternative for term creation.

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

Usage Guidelines2/5

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

No when-to-use / when-not-to-use guidance and no mention of alternatives such as woo_create_attribute_term for adding terms to an existing attribute. The only hint at usage is the schema's 'see list_sites' pointer for the site id.

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