Skip to main content
Glama

wpnav_describe_tools

Retrieve detailed input schemas for WordPress management tools to understand required parameters before execution.

Instructions

Get full input schemas for specific WP Navigator tools. Call this after using wpnav_search_tools to get the schemas you need before calling wpnav_execute.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toolsYesArray of tool names to describe (e.g., ["wpnav_create_post", "wpnav_update_post"]). Maximum 10 tools per request.

Implementation Reference

  • The core handler function that implements the logic for wpnav_describe_tools. It validates input, fetches tool definitions from the registry, formats categories, and returns JSON schemas for the requested tools.
    export async function describeToolsHandler( args: { tools: string[] }, // eslint-disable-next-line @typescript-eslint/no-unused-vars context: ToolExecutionContext ): Promise<ToolResult> { const { tools: requestedTools } = args; // Validate input if (!Array.isArray(requestedTools)) { return { content: [ { type: 'text', text: JSON.stringify( { error: 'INVALID_INPUT', message: 'tools must be an array of tool names', }, null, 2 ), }, ], }; } if (requestedTools.length === 0) { return { content: [ { type: 'text', text: JSON.stringify( { error: 'INVALID_INPUT', message: 'tools array cannot be empty', hint: 'Use wpnav_search_tools to find tools first', }, null, 2 ), }, ], }; } // Enforce max items limit const toolsToDescribe = requestedTools.slice(0, MAX_TOOLS); const truncated = requestedTools.length > MAX_TOOLS; // Build response const response: DescribeToolsResponse = { tools: [], not_found: [], }; for (const toolName of toolsToDescribe) { const tool = toolRegistry.getTool(toolName); if (!tool) { response.not_found.push(toolName); continue; } // Get category name const categoryName = CATEGORY_NAMES[tool.category] || 'other'; response.tools.push({ name: tool.definition.name, description: tool.definition.description || '', inputSchema: tool.definition.inputSchema, category: categoryName, }); } // Add truncation warning if applicable const result: Record<string, unknown> = { ...response }; if (truncated) { result.warning = `Only first ${MAX_TOOLS} tools described. Request contained ${requestedTools.length} tools.`; } return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }
  • The input schema and metadata definition for the wpnav_describe_tools tool.
    export const describeToolsDefinition = { name: 'wpnav_describe_tools', description: 'Get full input schemas for specific WP Navigator tools. Call this after using wpnav_search_tools to get the schemas you need before calling wpnav_execute.', inputSchema: { type: 'object' as const, properties: { tools: { type: 'array', items: { type: 'string' }, maxItems: MAX_TOOLS, description: `Array of tool names to describe (e.g., ["wpnav_create_post", "wpnav_update_post"]). Maximum ${MAX_TOOLS} tools per request.`, }, }, required: ['tools'], }, };
  • The registration function that adds wpnav_describe_tools to the tool registry with its definition and handler.
    export function registerDescribeTools(): void { toolRegistry.register({ definition: describeToolsDefinition, handler: describeToolsHandler, category: ToolCategory.CORE, }); }
  • The call to register the wpnav_describe_tools tool during core tools initialization.
    registerDescribeTools();
  • Inclusion of wpnav_describe_tools in the META_TOOLS set, making it directly accessible via MCP ListTools and CallTool without needing dynamic execution.
    const META_TOOLS = new Set([ 'wpnav_introspect', 'wpnav_search_tools', 'wpnav_describe_tools', 'wpnav_execute', 'wpnav_context', ]);

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