Skip to main content
Glama

search_categories

Search for Lucide Icons categories by name using partial matching. Specify a query and limit results to find relevant icon categories efficiently.

Instructions

Search for icon categories by category name using partial matching

Input Schema

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

Implementation Reference

  • src/utils.ts:109-122 (registration)
    Full registration of the 'search_categories' MCP tool including name, description, input schema, and handler function.
    // Tool: search_categories server.tool( "search_categories", "Search for icon categories by category name using partial matching", { query: z.string().describe("Search term for category name"), limit: searchSchemas.categoryLimit.describe("Max results to return") }, async ({ query, limit }) => { let results = SearchService.filterCategories(query); results = SearchService.applyLimit(results, limit); return createTextResponse(results); } );
  • The async handler function that executes the tool logic: filters categories by query using partial matching, applies limit, and returns formatted response.
    async ({ query, limit }) => { let results = SearchService.filterCategories(query); results = SearchService.applyLimit(results, limit); return createTextResponse(results); }
  • Zod input schema defining 'query' (string) and optional 'limit' (number) parameters for the tool.
    { query: z.string().describe("Search term for category name"), limit: searchSchemas.categoryLimit.describe("Max results to return") },
  • SearchService helper method implementing the partial matching filter logic on the categories array.
    static filterCategories(categoryName: string) { return categories.filter((category) => category.name.toLowerCase().includes(categoryName.toLowerCase()) ); }
  • Definition of categoryLimit schema used in the tool's input schema (max 50, default 10).
    categoryLimit: limitSchema(50, 10),

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