Skip to main content
Glama

search_icons

Find icons on The Noun Project by searching with terms and filtering by style, line weight, public domain status, thumbnail size, and SVG inclusion.

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 implementation of the search_icons tool: constructs query parameters from input, builds OAuth-signed API request to Noun Project /v2/icon endpoint, and returns the search results.
    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 type definition for input parameters accepted by the searchIcons handler.
    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: defines name, description, and input schema for the 'search_icons' tool in the exported TOOLS array.
    { 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 dispatch handler for 'search_icons' tool calls: invokes the api.searchIcons function and formats output as MCP response content.
    case 'search_icons': { const result = await api.searchIcons(args as any); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }
  • src/index.ts:42-46 (registration)
    Registers the tool list handler, which returns the TOOLS array including 'search_icons' for MCP clients to discover available tools.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: 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