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',
    ]);
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses the tool's purpose (retrieving schemas) and its role in a sequence (post-search, pre-execute), which is useful behavioral context. However, it doesn't mention potential limitations like rate limits, error handling, or response format details, leaving some behavioral aspects unspecified.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the core purpose and followed by usage guidance. Every word earns its place with no redundancy or fluff, making it highly efficient and easy to parse for an AI agent.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (1 parameter, no output schema, no annotations), the description is largely complete: it explains the purpose, workflow context, and usage sequence. However, it lacks details on what the schemas contain or how to interpret them, which could be helpful for an agent. The absence of an output schema means the description doesn't cover return values, but this is acceptable as it's not required to do so.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, so the schema fully documents the single parameter 'tools' (an array of strings with a max of 10 items). The description adds no additional parameter semantics beyond what's in the schema, such as examples or usage nuances, but this is acceptable given the high schema coverage, resulting in the baseline score of 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Get full input schemas') and target resource ('specific WP Navigator tools'), distinguishing it from siblings like wpnav_search_tools (which searches for tools) and wpnav_execute (which executes tools). It explicitly names the verb and resource with precision.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use this tool ('Call this after using wpnav_search_tools') and why ('to get the schemas you need before calling wpnav_execute'), clearly positioning it in the workflow relative to alternatives. It specifies the prerequisite (wpnav_search_tools) and the follow-up action (wpnav_execute).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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