Skip to main content
Glama

list_icons

Retrieve a comprehensive list of all available icons within the Hugeicons library for easy integration and selection in your projects.

Instructions

Get a list of all available Hugeicons icons

Input Schema

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "properties": {}, "required": [], "type": "object" }

Implementation Reference

  • The main handler function that loads the icons cache if necessary and returns the full list of icons as JSON-formatted text content.
    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; } }
  • Input schema definition for the list_icons tool, specifying no required parameters.
    inputSchema: { type: "object", properties: {}, required: [], },
  • src/index.ts:71-79 (registration)
    Tool registration in the ListToolsRequest 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:157-158 (registration)
    Dispatch registration in the CallToolRequest switch statement, routing list_icons calls to the handler.
    case "list_icons": return await this.handleListIcons();
  • Helper method used by the handler to load and cache the complete list of icons from the external API.
    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" ); } }

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

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