Skip to main content
Glama

Assign terms to content

assign_terms_to_content

Assign taxonomy terms to any content item by ID or name, creating missing terms. Replace, add, or remove terms with mode options.

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.
Behavior3/5

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

Annotations already indicate this is a mutation (readOnlyHint=false, destructiveHint=false). The description adds valuable behavioral context: the default 'replace' mode and the side effect of auto-creating unknown term names. It also explains the effect of each mode. However, it doesn't disclose potential impacts like whether 'remove' could delete terms globally or affect other content, though 'detach' implies only association removal. This is adequate given annotation coverage.

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 concise: two sentences that front-load the core action and purpose, then explain the key behavioral nuance (auto-creation and modes). No filler or repetition. It earns a 4 for being compact and well-organized.

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

Completeness4/5

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

For a 7-param tool with 3 required and no output schema, the description covers the essential behavior: assigning terms, handling names vs IDs, and the three modes. It doesn't explain the site_id selection logic (but that's in the schema) or type parameter, and it doesn't discuss return value, but that's not required without an output schema. Overall, an agent can call this tool correctly with this description and schema.

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 coverage is 100%, and the schema already describes all parameters including the 'unknown names are created' behavior for terms and default modes. The description repeats this and clarifies the default replace behavior, but adds little beyond what the schema provides. Since coverage is high, baseline 3 is appropriate; the description doesn't add unique semantic value for parameters.

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?

The description clearly states the action ('Assign taxonomy terms') and the resource ('to any content item'). It distinguishes itself from related tools like create_term or list_terms by focusing on assigning terms to existing content, and the added detail about auto-creating unknown names further clarifies its scope. However, it doesn't explicitly name a sibling to differentiate from, so it's not a 5.

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

Usage Guidelines3/5

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

The description gives clear context on when to use this tool (to assign terms to content) and explains the three modes (replace, add, remove) which guide the agent in choosing the right behavior. It doesn't explicitly mention alternatives like get_content_terms for reading terms, but the purpose is clear enough that an agent likely won't confuse it with other tools. Missing explicit 'when-not-to-use' guidance prevents a 4.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/alokemajumder/wpxmcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server