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');
        }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states what the tool does but does not disclose behavioral traits such as whether it's a read-only operation, potential rate limits, error handling, or the format of returned data. For a tool with no annotation coverage, this leaves significant gaps in understanding its behavior.

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

Conciseness5/5

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

The description is a single, efficient sentence that front-loads the key information ('Get all glyphs...') without any wasted words. It is appropriately sized for the tool's complexity and earns its place by clearly stating the purpose and scope.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (1 parameter, no output schema, no annotations), the description is minimally complete. It states the purpose but lacks details on behavioral aspects like data format or error handling. Without annotations or an output schema, the description should do more to compensate, but it meets the basic requirement for a simple lookup 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 schema description coverage is 100%, with the parameter 'icon_name' fully documented in the schema. The description adds no additional meaning beyond the schema, such as examples of valid icon names beyond those in the schema or constraints. Since the schema does the heavy lifting, the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get' and the resource 'glyphs (unicode characters) for a specific icon across all available styles', making the purpose specific and actionable. It distinguishes from sibling tools like 'get_icon_glyph_by_style' (which likely gets glyphs for a single style) and 'list_icons' (which lists icons rather than glyphs), providing clear differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when needing glyphs for a specific icon across all styles, but does not explicitly state when to use this tool versus alternatives like 'get_icon_glyph_by_style' or 'search_icons'. It provides clear context (e.g., 'for a specific icon') but lacks explicit exclusions or named alternatives, falling short of a perfect score.

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

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