Skip to main content
Glama

fuzzy_search_categories

Find Lucide Icons categories using fuzzy search by entering a query term and specifying the number of results to display. Simplifies locating relevant icon categories efficiently.

Instructions

Fuzzy Search for icon categories by category name

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax results to return
queryYesSearch term for category name

Implementation Reference

  • The inline async handler function for the fuzzy_search_categories tool. It creates a Fuse.js searcher on the categories data, performs fuzzy search with the query, applies the optional limit to results, and returns a formatted text response.
    async ({ query, limit }) => {
      const fuse = SearchService.createFuseSearch(categories, ["name"]);
      let results = fuse.search(query);
      results = SearchService.applyLimit(results, limit);
      return createTextResponse(results);
    }
  • Zod schema defining the input parameters: required 'query' string and optional 'limit' number (validated via shared schema).
    {
      query: z.string().describe("Search term for category name"),
      limit: searchSchemas.categoryLimit.describe("Max results to return")
    },
  • src/utils.ts:141-154 (registration)
    Registration of the 'fuzzy_search_categories' tool on the MCP server, including name, description, schema, and handler.
    server.tool(
      "fuzzy_search_categories",
      "Fuzzy Search for icon categories by category name",
      {
        query: z.string().describe("Search term for category name"),
        limit: searchSchemas.categoryLimit.describe("Max results to return")
      },
      async ({ query, limit }) => {
        const fuse = SearchService.createFuseSearch(categories, ["name"]);
        let results = fuse.search(query);
        results = SearchService.applyLimit(results, limit);
        return createTextResponse(results);
      }
    );
  • Static helper method in SearchService that initializes a Fuse.js instance for fuzzy searching on the given data and keys, case-insensitive.
    static createFuseSearch<T>(data: T[], keys: string[]) {
      return new Fuse(data, {
        keys,
        isCaseSensitive: false
      });
    }
  • Utility function to create a standard MCP text response by stringifying the data as pretty JSON.
    const createTextResponse = (data: any) => ({
      content: [
        {
          type: "text" as const,
          text: JSON.stringify(data, null, 2)
        }
      ]
    });
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It only states the action ('Fuzzy Search') without details on permissions, rate limits, error handling, or what 'fuzzy' entails (e.g., partial matches, typos). This leaves significant gaps for a search tool.

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 a single, efficient sentence with zero waste. It is appropriately sized and front-loaded, clearly stating the tool's purpose without unnecessary elaboration.

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

Completeness2/5

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

Given the complexity of a search tool with no annotations and no output schema, the description is incomplete. It lacks details on behavioral traits (e.g., how 'fuzzy' works, return format) and doesn't compensate for the absence of structured data, making it inadequate for full agent understanding.

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 already documents both parameters ('query' and 'limit') adequately. The description adds no additional meaning beyond implying 'category name' for the query, which is minimal value. Baseline 3 is appropriate as the schema does the heavy lifting.

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

Purpose4/5

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

The description clearly states the verb ('Fuzzy Search') and resource ('icon categories by category name'), making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'search_categories' or 'list_all_categories', which prevents a perfect score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'search_categories' or 'list_all_categories'. There is no mention of context, prerequisites, or exclusions, leaving the agent without usage direction.

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

Related 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/SeeYangZhi/lucide-icons-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server