Skip to main content
Glama

search_icons

Find and retrieve icons from Lucide by name or category using partial matching, with optional filters and result limits for precise searches.

Instructions

Search for icons from lucide by name or category using partial matching

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryNocategory to filter by (optional)
limitNoMax results to return
queryYesSearch term for icon name

Implementation Reference

  • Handler function for the 'search_icons' tool that performs partial matching on icon names, optionally filters by category, applies a limit, and returns a formatted text response with the results.
    async ({ query, category, limit }) => {
      let results = SearchService.filterIconsByName(iconMetadata, query);
    
      if (category) {
        results = SearchService.filterIconsByCategory(results, category);
      }
    
      results = SearchService.applyLimit(results, limit);
      return createTextResponse(results);
    }
  • Zod input schema defining parameters for the 'search_icons' tool: query (required string), category (optional string), limit (optional number with constraints).
    {
      query: z.string().describe("Search term for icon name"),
      category: z
        .string()
        .optional()
        .describe("category to filter by (optional)"),
      limit: searchSchemas.iconLimit.describe("Max results to return")
    },
  • src/utils.ts:86-107 (registration)
    Registration of the 'search_icons' tool using server.tool(), including name, description, input schema, and handler function.
    server.tool(
      "search_icons",
      "Search for icons from lucide by name or category using partial matching",
      {
        query: z.string().describe("Search term for icon name"),
        category: z
          .string()
          .optional()
          .describe("category to filter by (optional)"),
        limit: searchSchemas.iconLimit.describe("Max results to return")
      },
      async ({ query, category, limit }) => {
        let results = SearchService.filterIconsByName(iconMetadata, query);
    
        if (category) {
          results = SearchService.filterIconsByCategory(results, category);
        }
    
        results = SearchService.applyLimit(results, limit);
        return createTextResponse(results);
      }
    );
  • SearchService helper method for filtering icons by partial name match (case-insensitive). Used in the search_icons handler.
    static filterIconsByName(icons: typeof iconMetadata, name: string) {
      return icons.filter((icon) =>
        icon.name.toLowerCase().includes(name.toLowerCase())
      );
    }
  • SearchService helper method for filtering icons by partial category match (case-insensitive). Used conditionally in the search_icons handler.
    static filterIconsByCategory(icons: typeof iconMetadata, category: string) {
      return icons.filter((icon) =>
        icon.categories.some((cat) =>
          cat.toLowerCase().includes(category.toLowerCase())
        )
      );
    }
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the search functionality. It doesn't disclose behavioral traits like whether this is a read-only operation, performance characteristics, rate limits, authentication needs, or what happens when no results are found. For a search tool with zero annotation coverage, this is inadequate.

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 that communicates the core functionality without any wasted words. It's appropriately sized and front-loaded with the essential information.

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 tool has no annotations and no output schema, the description should do more to explain what the tool returns, error conditions, or behavioral constraints. For a search tool with 3 parameters and multiple sibling tools, the current description is insufficiently complete.

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 already documents all three parameters (query, category, limit) with their descriptions and constraints. The description adds no additional parameter semantics beyond what's in the schema, meeting the baseline expectation when 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 ('Search for'), resource ('icons from lucide'), and method ('by name or category using partial matching'). It distinguishes from siblings like 'list_all_icons_by_category' by specifying search functionality, though it doesn't explicitly differentiate from 'fuzzy_search_icons' which may have similar functionality.

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

Usage Guidelines3/5

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

The description implies usage for searching by name or category with partial matching, but doesn't explicitly state when to use this tool versus alternatives like 'fuzzy_search_icons' or 'search_categories'. It provides some context but lacks clear guidance on tool selection among siblings.

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