Skip to main content
Glama

wpnav_search_tools

Search for WordPress management tools in WP Navigator MCP using natural language queries or category filters to find specific functionality for content, plugins, themes, or users.

Instructions

Find WP Navigator tools by natural language query or category. Returns tool names and brief descriptions only (not full schemas). Use wpnav_describe_tools to get full schemas for tools you want to use.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNoNatural language search query (e.g., "create a blog post", "manage plugins", "edit pages")
categoryNoFilter by tool category
limitNoMaximum number of results (default: 10, max: 25)

Implementation Reference

  • Handler for wpnav_search_tools: validates input, performs semantic search via embeddings or category filtering, and returns tool names, descriptions, and categories in JSON format.
    export async function searchToolsHandler(
      args: { query?: string; category?: string; limit?: number },
      // eslint-disable-next-line @typescript-eslint/no-unused-vars
      context: any
    ): Promise<{ content: Array<{ type: 'text'; text: string }> }> {
      const { query, category, limit = 10 } = args;
    
      // Validate: at least one of query or category required
      if (!query && !category) {
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(
                {
                  error: 'At least one of query or category is required',
                  available_categories: VALID_CATEGORIES,
                },
                null,
                2
              ),
            },
          ],
        };
      }
    
      // Validate category if provided
      if (category && !VALID_CATEGORIES.includes(category as ValidCategory)) {
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(
                {
                  error: `Invalid category: ${category}`,
                  available_categories: VALID_CATEGORIES,
                },
                null,
                2
              ),
            },
          ],
        };
      }
    
      // Clamp limit to valid range
      const effectiveLimit = Math.max(1, Math.min(25, limit));
    
      let results: ToolSearchResult[];
    
      if (query && category) {
        // Combined: semantic search then filter by category
        // Search with higher limit to ensure we get enough after filtering
        const searchResults = embeddingsSearch(query, { limit: effectiveLimit * 3 });
        results = searchResults.filter((r) => r.category.toLowerCase() === category.toLowerCase());
        results = results.slice(0, effectiveLimit);
      } else if (query) {
        // Query only: semantic search
        results = embeddingsSearch(query, { limit: effectiveLimit });
      } else {
        // Category only: filter by category
        const categoryResults = searchByCategory(category!);
        results = categoryResults.slice(0, effectiveLimit);
      }
    
      // Build response
      const response: SearchToolsResponse = {
        tools: results.map((r) => ({
          name: r.name,
          description: r.description,
          category: r.category,
        })),
        total_matching: results.length,
        hint: 'Use wpnav_describe_tools to get full schemas for these tools',
      };
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(response, null, 2),
          },
        ],
      };
    }
  • Tool definition object for wpnav_search_tools, including name, description, and detailed inputSchema with properties for query, category (enum), and limit.
    export const searchToolsDefinition = {
      name: 'wpnav_search_tools',
      description:
        'Find WP Navigator tools by natural language query or category. Returns tool names and brief descriptions only (not full schemas). Use wpnav_describe_tools to get full schemas for tools you want to use.',
      inputSchema: {
        type: 'object' as const,
        properties: {
          query: {
            type: 'string',
            description:
              'Natural language search query (e.g., "create a blog post", "manage plugins", "edit pages")',
          },
          category: {
            type: 'string',
            enum: VALID_CATEGORIES as unknown as string[],
            description: 'Filter by tool category',
          },
          limit: {
            type: 'number',
            default: 10,
            maximum: 25,
            minimum: 1,
            description: 'Maximum number of results (default: 10, max: 25)',
          },
        },
      },
    };
  • Registration function that registers the wpnav_search_tools with the toolRegistry using its definition and handler.
    export function registerSearchTools(): void {
      toolRegistry.register({
        definition: searchToolsDefinition,
        handler: searchToolsHandler,
        category: ToolCategory.CORE,
      });
    }
  • Invocation of registerSearchTools() as part of core tools registration in the index file.
    registerSearchTools();
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses key behavioral traits: it's a search/discovery tool (implied read-only), returns limited information ('tool names and brief descriptions only'), and references a follow-up action (wpnav_describe_tools). However, it doesn't mention potential limitations like rate limits, authentication needs, or error conditions, which would be helpful for a tool with no annotation coverage.

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, followed by a crucial usage guideline. Every word earns its place—there's no redundancy or fluff, making it highly efficient and easy to parse.

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 (search with 3 parameters), no annotations, and no output schema, the description does well by clarifying the limited return format and pointing to wpnav_describe_tools for full details. However, it could be more complete by hinting at the output structure (e.g., list of objects with name/description fields) or common use cases, which would help the agent anticipate results.

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?

Schema description coverage is 100%, so the schema fully documents all three parameters (query, category, limit). The description adds no additional parameter semantics beyond what's in the schema, such as search algorithm details or category descriptions. Baseline 3 is appropriate when the schema does all the work.

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 explicitly states the verb 'Find' and resource 'WP Navigator tools', specifies the search methods ('by natural language query or category'), and distinguishes it from sibling wpnav_describe_tools by clarifying it returns 'tool names and brief descriptions only (not full schemas)'. This is specific and clearly differentiates from alternatives.

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 ('Find WP Navigator tools by natural language query or category') and when to use an alternative ('Use wpnav_describe_tools to get full schemas for tools you want to use'). It clearly directs the agent to this tool for discovery and the sibling for detailed schema retrieval.

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