Skip to main content
Glama

get_icon

Retrieve detailed metadata, creator information, tags, and download URLs for specific icons using their unique ID numbers.

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 implementation of the get_icon tool: fetches detailed icon information by ID from Noun Project API using OAuth-authenticated GET request.
    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 callTool dispatch handler for 'get_icon': calls the API method and returns JSON-formatted result as text content.
    case 'get_icon': { const result = await api.getIcon(args as any); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }
  • MCP tool definition for 'get_icon' including name, description, and input schema for validation.
    { 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 method.
    export interface GetIconParams { icon_id: number; thumbnail_size?: 42 | 84 | 200; }
  • src/index.ts:42-46 (registration)
    Registers the listTools handler that provides the tool list including 'get_icon'.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: 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/sgup/noun-project-mcp'

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