Skip to main content
Glama

wpnav_get_plugin

Retrieve detailed metadata for a specific WordPress plugin, including description, author, and version information, using its unique slug identifier.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pluginYesPlugin identifier from wpnav_list_plugins "plugin" field (e.g., "wordfence/wordfence", "hello"). Do NOT include .php extension.

Implementation Reference

  • Executes the tool: validates 'plugin' arg, normalizes slug, calls WP REST API /wp/v2/plugins/{slug}, returns JSON response.
    handler: async (args, context) => { validateRequired(args, ['plugin']); const endpoint = `/wp/v2/plugins/${normalizePluginPath(args.plugin)}`; const plugin = await context.wpRequest(endpoint); return { content: [{ type: 'text', text: context.clampText(JSON.stringify(plugin, null, 2)) }], }; },
  • Input schema defining required 'plugin' string parameter with description.
    inputSchema: { type: 'object', properties: { plugin: { type: 'string', description: 'Plugin identifier from wpnav_list_plugins "plugin" field (e.g., "wordfence/wordfence", "hello"). Do NOT include .php extension.' }, }, required: ['plugin'], },
  • Full tool registration call to toolRegistry, including name, description, schema, handler, and category.
    toolRegistry.register({ definition: { name: 'wpnav_get_plugin', description: 'Get details about a specific plugin by slug. Returns full metadata including description, author, and version.', inputSchema: { type: 'object', properties: { plugin: { type: 'string', description: 'Plugin identifier from wpnav_list_plugins "plugin" field (e.g., "wordfence/wordfence", "hello"). Do NOT include .php extension.' }, }, required: ['plugin'], }, }, handler: async (args, context) => { validateRequired(args, ['plugin']); const endpoint = `/wp/v2/plugins/${normalizePluginPath(args.plugin)}`; const plugin = await context.wpRequest(endpoint); return { content: [{ type: 'text', text: context.clampText(JSON.stringify(plugin, null, 2)) }], }; }, category: ToolCategory.PLUGINS, });
  • Helper function to normalize plugin identifiers (e.g., 'wordfence%2Fwordfence' -> 'wordfence/wordfence') for WP REST API paths.
    function normalizePluginPath(plugin: string): string { // First decode any URL-encoded characters (handles pre-encoded input from Claude Code) const decoded = decodeURIComponent(plugin); // Then encode individual parts but preserve the slash for /wp-json/ path format const result = decoded.split('/').map(part => encodeURIComponent(part)).join('/'); return result; }

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