Skip to main content
Glama

List terms

wp_list_terms
Read-onlyIdempotent

Lists categories, tags or custom taxonomy terms ordered by name, with search, per_page and hide_empty filters, returning term ID, slug and count for review.

Instructions

List the terms of one taxonomy (categories, tags or a custom taxonomy), ordered by name. Returns terms: [{term_id, name, slug, count, parent}]; count is the number of objects WordPress counts for the term, parent is 0 at the top level. Only the first per_page matches are returned; there are no further pages. Terms of a non-public taxonomy need the right to assign them. Read-only; wp_get_term returns one term with its description.

Input Schema

NameRequiredDescriptionDefault
searchNoOnly terms whose name or slug contains this text.
per_pageNoMaximum number of terms, 1–500; other values are clamped. Default 100.
taxonomyYesTaxonomy name, e.g. "category", "post_tag" or a custom one, as wp_get_taxonomies lists it. An unknown taxonomy is refused.
hide_emptyNotrue leaves out terms whose count is 0; in a hierarchical taxonomy a parent stays when a descendant is not empty. Default false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.7.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, non-destructive, so the description's extra context is what matters: it discloses the hard pagination ceiling ('no further pages'), the permission requirement for non-public taxonomies, and the return field shape. Return format is fully explained for a tool with no output schema; only rate/error behavior is left implicit.

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?

Three dense sentences, front-loaded with scope and ordering, then return shape, then the pagination/permission caveats, ending with the sibling pointer. Nearly every clause earns its place; the return-shape inline listing is slightly compressed but justified given there is no output schema.

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 what the tool does, its ordering, its pagination boundary, permission prerequisites, the shape and meaning of returned fields, and the sibling that fetches a single term. Since no output schema exists, including the return structure here is exactly the right compensation.

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 taxonomy, search, per_page, and hide_empty are already documented; the description mostly repeats the per_page limit. It does add meaning for the returned 'count' and 'parent' fields, but those are output semantics rather than parameter semantics, so the baseline 3 holds.

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 ('List the terms of one taxonomy'), names the taxonomy kinds, and specifies ordering. It also distinguishes itself from a named sibling ('wp_get_term returns one term with its description'), so an agent can route between them without opening either schema.

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?

Gives clear usage context: one taxonomy per call, terms of a non-public taxonomy require the right to assign them, and only the first per_page matches come back. The wp_get_term pointer supplies an implicit alternative, but there is no explicit 'use this instead when…' exclusion (e.g., for enumerating across taxonomies).

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