Skip to main content
Glama

wpnav_get_taxonomy

Retrieve detailed configuration for WordPress taxonomies to understand site structure, including hierarchical status, REST base, and labels.

Instructions

Get details about a specific taxonomy by name. Returns full taxonomy configuration including hierarchical status, REST base, and labels. Always available for site structure discovery.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taxonomyYesTaxonomy name (e.g., "category", "post_tag", or custom taxonomy)

Implementation Reference

  • The handler function for 'wpnav_get_taxonomy'. Validates the required 'taxonomy' parameter, fetches the taxonomy details from the WordPress REST API endpoint `/wp/v2/taxonomies/${taxonomy}`, formats the response as JSON, and returns it in the tool's content structure.
    handler: async (args, context) => { validateRequired(args, ['taxonomy']); const taxonomy = await context.wpRequest(`/wp/v2/taxonomies/${args.taxonomy}`); return { content: [{ type: 'text', text: context.clampText(JSON.stringify(taxonomy, null, 2)) }], }; },
  • The input schema for the 'wpnav_get_taxonomy' tool, defining a required 'taxonomy' string property.
    inputSchema: { type: 'object', properties: { taxonomy: { type: 'string', description: 'Taxonomy name (e.g., "category", "post_tag", or custom taxonomy)' }, }, required: ['taxonomy'], },
  • The toolRegistry.register call that defines and registers the 'wpnav_get_taxonomy' tool, including its name, description, input schema, handler function, and category.
    toolRegistry.register({ definition: { name: 'wpnav_get_taxonomy', description: 'Get details about a specific taxonomy by name. Returns full taxonomy configuration including hierarchical status, REST base, and labels. Always available for site structure discovery.', inputSchema: { type: 'object', properties: { taxonomy: { type: 'string', description: 'Taxonomy name (e.g., "category", "post_tag", or custom taxonomy)' }, }, required: ['taxonomy'], }, }, handler: async (args, context) => { validateRequired(args, ['taxonomy']); const taxonomy = await context.wpRequest(`/wp/v2/taxonomies/${args.taxonomy}`); return { content: [{ type: 'text', text: context.clampText(JSON.stringify(taxonomy, null, 2)) }], }; }, category: ToolCategory.TAXONOMY, }); }

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/littlebearapps/wp-navigator-mcp'

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