Skip to main content
Glama

get_icon_glyphs

Retrieve Unicode glyph characters for any Hugeicons icon across all available styles by specifying the icon name.

Instructions

Get all glyphs (unicode characters) for a specific icon across all available styles

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
icon_nameYesThe name of the icon (e.g., 'home-01', 'notification-02')

Implementation Reference

  • Main handler for get_icon_glyphs tool: validates icon_name, calls getAllGlyphs helper, formats response as JSON.
    private async handleGetIconGlyphs(args: any) { try { const iconName = this.validateIconName(args); const glyphs = await getAllGlyphs(iconName); return { content: [ { type: "text", text: JSON.stringify(glyphs, null, 2), }, ], }; } catch (error) { throw new McpError( ErrorCode.InternalError, `Failed to get icon glyphs: ${error instanceof Error ? error.message : "Unknown error"}` ); } }
  • src/index.ts:109-122 (registration)
    Registration of get_icon_glyphs tool in ListToolsRequestSchema handler, including name, description, and input schema.
    { name: "get_icon_glyphs", description: "Get all glyphs (unicode characters) for a specific icon across all available styles", inputSchema: { type: "object", properties: { icon_name: { type: "string", description: "The name of the icon (e.g., 'home-01', 'notification-02')", } }, required: ["icon_name"], }, },
  • Core helper function that performs HTTP request to Hugeicons API to retrieve all glyphs for the specified icon.
    export async function getAllGlyphs(iconName: string): Promise<Glyph[]> { if (!iconName || !iconName.trim()) { throw new Error('Icon name is required'); } try { const response = await axios.get<AllGlyphsResponse>( `${HUGEICONS_API_BASE}/icon/${iconName.trim()}/glyphs`, { headers: { 'accept': 'application/json' }, timeout: 10000, // 10 second timeout } ); if (!response.data.success) { throw new Error(response.data.message || 'Failed to fetch glyphs'); } return response.data.data.glyphs; } catch (error: any) { if (error.response?.status === 404) { throw new Error(`Icon '${iconName}' not found`); } if (error.message) { throw new Error(`Failed to fetch glyphs: ${error.message}`); } throw new Error('Failed to fetch glyphs'); } }

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