Skip to main content
Glama

list_icons

Retrieve all available Hugeicons icons for integration into platforms. This tool provides a complete list to help developers find and use appropriate icons in their projects.

Instructions

Get a list of all available Hugeicons icons

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function that executes the list_icons tool logic: ensures icons are cached/loaded from API and returns the JSON-formatted list.
    private async handleListIcons() { try { await this.ensureIconsLoaded(); return { content: [ { type: "text", text: JSON.stringify(this.iconsCache, null, 2), }, ], }; } catch (error) { if (error && typeof error === 'object' && 'isAxiosError' in error) { throw new McpError( ErrorCode.InternalError, `Failed to list icons: ${(error as any).message}` ); } throw error; } }
  • src/index.ts:71-79 (registration)
    Tool registration in ListToolsRequestSchema handler, defining name, description, and input schema.
    { name: "list_icons", description: "Get a list of all available Hugeicons icons", inputSchema: { type: "object", properties: {}, required: [], }, },
  • src/index.ts:158-159 (registration)
    Dispatch routing in CallToolRequestSchema handler to the list_icons handler function.
    case "list_icons": return await this.handleListIcons();
  • Input schema definition for the list_icons tool (empty object, no required parameters).
    inputSchema: { type: "object", properties: {}, required: [], },
  • Supporting helper function to load and cache the full list of icons from the external API, called by the handler.
    private async ensureIconsLoaded() { if (this.iconsCache) return; try { const response = await axios.get<{ icons: IconInfo[] }>("https://hugeicons.com/api/icons"); this.iconsCache = response.data.icons; } catch (error) { throw new McpError( ErrorCode.InternalError, "Failed to load icons data" ); } }

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/hugeicons/mcp-server'

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