Skip to main content
Glama

wpnav_get_theme

Retrieve detailed metadata for a specific WordPress theme, including description, author, and version, by providing its stylesheet slug.

Instructions

Get details about a specific theme by slug. Returns full metadata including description, author, and version.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stylesheetYesTheme stylesheet from wpnav_list_themes "stylesheet" field (e.g., "twentytwentyfour")

Implementation Reference

  • The handler function for the wpnav_get_theme tool. It validates the input, makes a WP REST API request to /wp/v2/themes/{stylesheet}, and returns the theme details as JSON text.
    handler: async (args, context) => { validateRequired(args, ['stylesheet']); const theme = await context.wpRequest(`/wp/v2/themes/${args.stylesheet}`); return { content: [{ type: 'text', text: context.clampText(JSON.stringify(theme, null, 2)) }], }; },
  • Input schema for wpnav_get_theme tool, requiring a 'stylesheet' string parameter.
    inputSchema: { type: 'object', properties: { stylesheet: { type: 'string', description: 'Theme stylesheet from wpnav_list_themes "stylesheet" field (e.g., "twentytwentyfour")' }, }, required: ['stylesheet'], },
  • Full registration of the wpnav_get_theme tool via toolRegistry.register, including definition (name, description, schema), handler, and category.
    toolRegistry.register({ definition: { name: 'wpnav_get_theme', description: 'Get details about a specific theme by slug. Returns full metadata including description, author, and version.', inputSchema: { type: 'object', properties: { stylesheet: { type: 'string', description: 'Theme stylesheet from wpnav_list_themes "stylesheet" field (e.g., "twentytwentyfour")' }, }, required: ['stylesheet'], }, }, handler: async (args, context) => { validateRequired(args, ['stylesheet']); const theme = await context.wpRequest(`/wp/v2/themes/${args.stylesheet}`); return { content: [{ type: 'text', text: context.clampText(JSON.stringify(theme, null, 2)) }], }; }, category: ToolCategory.THEMES, });

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