Skip to main content
Glama

wpnav_list_themes

Retrieve installed WordPress themes with details like name, version, and status to manage them effectively using the WP Navigator MCP server.

Instructions

List all installed WordPress themes. Returns theme identifier in "stylesheet" field (use this exact value for get/activate/delete operations), name, version, and status (active/inactive). Stylesheet is typically a lowercase hyphenated name (e.g., "twentytwentyfour", "developer-starter").

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusNoOptional filter by status (e.g., "active" or "inactive"). If omitted or set to "all", returns all themes.

Implementation Reference

  • The handler function executes the tool logic: builds query string for optional status filter, fetches themes via context.wpRequest to WP REST API endpoint /wp/v2/themes, and returns clamped JSON text response.
    handler: async (args, context) => { const params = new URLSearchParams(); if (args.status && args.status !== 'all') { params.append('status', args.status); } const qs = params.toString(); const endpoint = qs ? `/wp/v2/themes?${qs}` : '/wp/v2/themes'; const themes = await context.wpRequest(endpoint); return { content: [{ type: 'text', text: context.clampText(JSON.stringify(themes, null, 2)) }], }; },
  • Input schema defining the optional 'status' parameter for filtering by active/inactive themes.
    inputSchema: { type: 'object', properties: { status: { type: 'string', description: 'Optional filter by status (e.g., "active" or "inactive"). If omitted or set to "all", returns all themes.' }, }, required: [], },
  • The toolRegistry.register call that registers wpnav_list_themes with its full definition (name, description), inputSchema, handler, and category.
    toolRegistry.register({ definition: { name: 'wpnav_list_themes', description: 'List all installed WordPress themes. Returns theme identifier in "stylesheet" field (use this exact value for get/activate/delete operations), name, version, and status (active/inactive). Stylesheet is typically a lowercase hyphenated name (e.g., "twentytwentyfour", "developer-starter").', inputSchema: { type: 'object', properties: { status: { type: 'string', description: 'Optional filter by status (e.g., "active" or "inactive"). If omitted or set to "all", returns all themes.' }, }, required: [], }, }, handler: async (args, context) => { const params = new URLSearchParams(); if (args.status && args.status !== 'all') { params.append('status', args.status); } const qs = params.toString(); const endpoint = qs ? `/wp/v2/themes?${qs}` : '/wp/v2/themes'; const themes = await context.wpRequest(endpoint); return { content: [{ type: 'text', text: context.clampText(JSON.stringify(themes, null, 2)) }], }; }, category: ToolCategory.THEMES, });
  • Invocation of registerThemeTools() within registerAllTools(), which triggers registration of all theme tools including wpnav_list_themes.
    registerThemeTools();

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