Skip to main content
Glama
sgup
by sgup

search_icons

Find icons from The Noun Project by keyword, filtering by style, line weight, public domain status, and thumbnail size to suit design needs.

Instructions

Search for icons on The Noun Project. Supports filtering by style (solid/line), line weight, public domain status, and more.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch term for icons (e.g., "dog", "house", "bicycle")
stylesNoFilter by icon style: solid, line, or both (solid,line)
line_weightNoFor line icons, filter by line weight (1-60) or range (e.g., "18-20")
limit_to_public_domainNoSet to 1 to limit results to public domain icons only
thumbnail_sizeNoThumbnail size to return (42, 84, or 200 pixels)
include_svgNoSet to 1 to include SVG URLs in the response
limitNoMaximum number of results to return

Implementation Reference

  • Core handler function that executes the search_icons tool by constructing query parameters, generating OAuth headers, and making an HTTP GET request to the Noun Project API's icon search endpoint.
    async searchIcons(params: SearchIconsParams) {
      const { query, ...rest } = params;
      const queryParams = new URLSearchParams({
        query,
        ...Object.fromEntries(
          Object.entries(rest)
            .filter(([_, v]) => v !== undefined)
            .map(([k, v]) => [k, String(v)])
        ),
      });
    
      const url = `${BASE_URL}/v2/icon?${queryParams}`;
      const headers = this.oauth.getHeaders(url);
    
      const response = await this.client.get('/v2/icon', {
        params: Object.fromEntries(queryParams),
        headers,
      });
    
      return response.data;
    }
  • TypeScript interface defining the input parameters for the searchIcons function, matching the Noun Project API query parameters.
    export interface SearchIconsParams {
      query: string;
      styles?: 'solid' | 'line' | 'solid,line';
      line_weight?: number | string;
      limit_to_public_domain?: 0 | 1;
      thumbnail_size?: 42 | 84 | 200;
      include_svg?: 0 | 1;
      limit?: number;
      next_page?: string;
      prev_page?: string;
    }
  • src/tools.ts:4-48 (registration)
    MCP tool registration object defining the 'search_icons' tool, including name, description, and detailed inputSchema for validation.
    {
      name: 'search_icons',
      description:
        'Search for icons on The Noun Project. Supports filtering by style (solid/line), line weight, public domain status, and more.',
      inputSchema: {
        type: 'object',
        properties: {
          query: {
            type: 'string',
            description: 'Search term for icons (e.g., "dog", "house", "bicycle")',
          },
          styles: {
            type: 'string',
            enum: ['solid', 'line', 'solid,line'],
            description:
              'Filter by icon style: solid, line, or both (solid,line)',
          },
          line_weight: {
            type: ['number', 'string'],
            description:
              'For line icons, filter by line weight (1-60) or range (e.g., "18-20")',
          },
          limit_to_public_domain: {
            type: 'number',
            enum: [0, 1],
            description: 'Set to 1 to limit results to public domain icons only',
          },
          thumbnail_size: {
            type: 'number',
            enum: [42, 84, 200],
            description: 'Thumbnail size to return (42, 84, or 200 pixels)',
          },
          include_svg: {
            type: 'number',
            enum: [0, 1],
            description: 'Set to 1 to include SVG URLs in the response',
          },
          limit: {
            type: 'number',
            description: 'Maximum number of results to return',
          },
        },
        required: ['query'],
      },
    },
  • MCP server request handler dispatch case that invokes the api.searchIcons method and formats the response as MCP content.
    case 'search_icons': {
      const result = await api.searchIcons(args as any);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • JSON Schema for input validation used in MCP tool registration for search_icons.
    inputSchema: {
      type: 'object',
      properties: {
        query: {
          type: 'string',
          description: 'Search term for icons (e.g., "dog", "house", "bicycle")',
        },
        styles: {
          type: 'string',
          enum: ['solid', 'line', 'solid,line'],
          description:
            'Filter by icon style: solid, line, or both (solid,line)',
        },
        line_weight: {
          type: ['number', 'string'],
          description:
            'For line icons, filter by line weight (1-60) or range (e.g., "18-20")',
        },
        limit_to_public_domain: {
          type: 'number',
          enum: [0, 1],
          description: 'Set to 1 to limit results to public domain icons only',
        },
        thumbnail_size: {
          type: 'number',
          enum: [42, 84, 200],
          description: 'Thumbnail size to return (42, 84, or 200 pixels)',
        },
        include_svg: {
          type: 'number',
          enum: [0, 1],
          description: 'Set to 1 to include SVG URLs in the response',
        },
        limit: {
          type: 'number',
          description: 'Maximum number of results to return',
        },
      },
      required: ['query'],
    },
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. While it mentions filtering capabilities, it doesn't describe important behavioral aspects like rate limits, authentication requirements, pagination behavior, error conditions, or what the response format looks like. For a search tool with 7 parameters, this leaves significant gaps in understanding how the tool actually behaves.

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

Conciseness4/5

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

The description is efficiently structured in a single sentence that front-loads the core purpose. It wastes no words while covering the main filtering capabilities. However, it could be slightly more structured by separating the core purpose from the filtering features.

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?

For a search tool with 7 parameters and no output schema, the description is incomplete. It doesn't explain what the tool returns (icon metadata, thumbnails, download URLs), how results are structured, or important behavioral constraints. Without annotations or output schema, users lack crucial information about what to expect from this tool.

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 description mentions filtering by style, line weight, and public domain status, which maps to some parameters. However, with 100% schema description coverage, the input schema already provides comprehensive parameter documentation. The description adds minimal value beyond what's already in the structured schema, meeting the baseline for high schema coverage.

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 action ('Search for icons') and the resource ('on The Noun Project'), which provides specific verb+resource pairing. However, it doesn't explicitly differentiate this tool from sibling tools like 'icon_autocomplete' or 'get_icon', which might also involve icon retrieval operations.

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 mentions filtering capabilities but provides no guidance on when to use this tool versus alternatives like 'icon_autocomplete' or 'get_icon'. There's no indication of prerequisites, typical use cases, or when other tools might be more appropriate.

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/sgup/noun-project-mcp'

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