Skip to main content
Glama
sgup
by sgup

get_icon

Retrieve detailed information about a specific icon from The Noun Project by its unique ID, including metadata, creator details, tags, and download URLs.

Instructions

Get detailed information about a specific icon by its ID. Returns icon metadata, creator info, tags, and download URLs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
icon_idYesThe unique ID of the icon
thumbnail_sizeNoThumbnail size to return (42, 84, or 200 pixels)

Implementation Reference

  • Core handler function that fetches detailed information about a specific icon by ID from the Noun Project API, handling thumbnail size parameter and OAuth headers.
    async getIcon(params: GetIconParams) {
      const { icon_id, thumbnail_size } = params;
      const queryParams = thumbnail_size
        ? `?thumbnail_size=${thumbnail_size}`
        : '';
      const url = `${BASE_URL}/v2/icon/${icon_id}${queryParams}`;
      const headers = this.oauth.getHeaders(url);
    
      const response = await this.client.get(`/v2/icon/${icon_id}`, {
        params: thumbnail_size ? { thumbnail_size } : undefined,
        headers,
      });
    
      return response.data;
    }
  • MCP server tool dispatch handler for 'get_icon', calling the API method and formatting the response as MCP content.
    case 'get_icon': {
      const result = await api.getIcon(args as any);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • src/tools.ts:49-68 (registration)
    Tool registration in the TOOLS array, including name, description, and input schema for MCP listTools response.
    {
      name: 'get_icon',
      description:
        'Get detailed information about a specific icon by its ID. Returns icon metadata, creator info, tags, and download URLs.',
      inputSchema: {
        type: 'object',
        properties: {
          icon_id: {
            type: 'number',
            description: 'The unique ID of the icon',
          },
          thumbnail_size: {
            type: 'number',
            enum: [42, 84, 200],
            description: 'Thumbnail size to return (42, 84, or 200 pixels)',
          },
        },
        required: ['icon_id'],
      },
    },
  • TypeScript interface defining input parameters for the getIcon API method.
    export interface GetIconParams {
      icon_id: number;
      thumbnail_size?: 42 | 84 | 200;
    }

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