Skip to main content
Glama

Read a term

wp_get_term
Read-onlyIdempotent

Retrieve a WordPress taxonomy term by ID and taxonomy, returning its name, slug, description, count, and parent; use search when only name or slug is known.

Instructions

Get one term by id and taxonomy. Returns {term_id, name, slug, taxonomy, description, count, parent}; count is the number of objects WordPress counts for the term, parent is 0 at the top level. Terms of a non-public taxonomy need the right to assign them. A term that does not exist in that taxonomy returns a not-found error. A term known only by name or slug is found with wp_list_terms (search); the term's custom meta comes from wp_get_term_meta.

Input Schema

NameRequiredDescriptionDefault
term_idYesTerm id, as wp_list_terms returns it.
taxonomyYesTaxonomy the term belongs to, e.g. "category" or "post_tag".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.7.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already cover read-only, idempotent, non-destructive, so the bar is low, yet the description still adds what annotations cannot: the exact return shape, the meaning of 'count' and 'parent', the capability needed for non-public taxonomies, and the not-found failure mode.

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?

Front-loaded with the action, then the return shape, then the routing hints — no wasted sentences. The enumerated return fields are dense but each earns its place since 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?

For a two-required-param read tool with no output schema, the description supplies everything missing: return fields, field semantics, permission prerequisite, error behavior, and sibling routing. Nothing an agent needs to call it correctly is absent.

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% and both parameters are documented there, including the cross-reference to wp_list_terms for obtaining the id. The description adds no format or edge-case detail about term_id/taxonomy beyond what the schema states, so baseline 3 applies.

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 ('Get one term by id and taxonomy') and immediately distinguishes itself from wp_list_terms (name/slug search) and wp_get_term_meta (custom meta). An agent can pick it out of the crowded taxonomy sibling set without opening the schema.

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?

Explicit routing: terms known only by name/slug go to wp_list_terms, meta goes to wp_get_term_meta, and the id+taxonomy pair is the entry condition here. It also names the alternative tool by name rather than gesturing vaguely at one.

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