Skip to main content
Glama
sgup
by sgup

get_download_url

Generate custom download URLs for Noun Project icons with adjustable color and size settings in SVG or PNG formats.

Instructions

Get a download URL for an icon with custom color and size options. Supports SVG and PNG formats. Note: Free API access is limited to public domain icons only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
icon_idYesThe unique ID of the icon to download
colorNoHexadecimal color value (e.g., "FF0000" for red)
filetypeNoFile format: svg or png (note: SVG does not accept size parameter)
sizeNoFor PNG only, size in pixels (minimum 20, maximum 1200)

Implementation Reference

  • Core handler function that performs the HTTP request to the Noun Project API to generate a customized download URL for the specified icon.
    async getDownloadUrl(params: DownloadIconParams) {
      const { icon_id, ...rest } = params;
      const queryParams = new URLSearchParams(
        Object.fromEntries(
          Object.entries(rest)
            .filter(([_, v]) => v !== undefined)
            .map(([k, v]) => [k, String(v)])
        )
      );
    
      const queryString = queryParams.toString();
      const url = `${BASE_URL}/v2/icon/${icon_id}/download${
        queryString ? `?${queryString}` : ''
      }`;
      const headers = this.oauth.getHeaders(url);
    
      const response = await this.client.get(`/v2/icon/${icon_id}/download`, {
        params: queryString ? Object.fromEntries(queryParams) : undefined,
        headers,
      });
    
      return response.data;
    }
  • TypeScript interface defining the input parameters for the getDownloadUrl handler, used for type safety.
    export interface DownloadIconParams {
      icon_id: number;
      color?: string;
      filetype?: 'svg' | 'png';
      size?: number;
    }
  • src/tools.ts:158-185 (registration)
    Tool registration object defining the MCP tool name, description, and input schema, exported in TOOLS array for listTools.
    {
      name: 'get_download_url',
      description:
        'Get a download URL for an icon with custom color and size options. Supports SVG and PNG formats. Note: Free API access is limited to public domain icons only.',
      inputSchema: {
        type: 'object',
        properties: {
          icon_id: {
            type: 'number',
            description: 'The unique ID of the icon to download',
          },
          color: {
            type: 'string',
            description: 'Hexadecimal color value (e.g., "FF0000" for red)',
          },
          filetype: {
            type: 'string',
            enum: ['svg', 'png'],
            description: 'File format: svg or png (note: SVG does not accept size parameter)',
          },
          size: {
            type: 'number',
            description: 'For PNG only, size in pixels (minimum 20, maximum 1200)',
          },
        },
        required: ['icon_id'],
      },
    },
  • src/index.ts:126-136 (registration)
    Switch case in the MCP CallToolRequest handler that routes calls to get_download_url to the api.getDownloadUrl function and formats the response.
    case 'get_download_url': {
      const result = await api.getDownloadUrl(args as any);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
Behavior3/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 adds useful context: the tool is for downloading icons with customization, supports specific formats, and has a free API limitation. However, it lacks details on rate limits, authentication needs, error handling, or what the download URL entails (e.g., expiration, access controls). For a tool with no annotations, this is a moderate but incomplete disclosure.

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

Conciseness4/5

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

The description is appropriately sized and front-loaded: the first sentence states the core purpose, and the second adds important context (formats and API limitation). Both sentences earn their place by providing essential information without redundancy. It could be slightly more structured by explicitly separating usage notes, but it remains efficient and clear.

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 no annotations and no output schema, the description provides basic context but has gaps. It covers the tool's purpose, formats, and a free API limitation, but lacks details on behavioral aspects like rate limits, authentication, or what the output (download URL) entails. For a tool with 4 parameters and no structured output information, this is a minimal viable description, leaving the agent to infer or handle unknowns.

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?

Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds minimal value beyond the schema: it mentions 'custom color and size options' and 'Supports SVG and PNG formats,' which are already covered in the schema's descriptions and enum. Since the schema does the heavy lifting, the baseline score of 3 is appropriate, as the description does not significantly enhance parameter understanding.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'Get a download URL for an icon with custom color and size options. Supports SVG and PNG formats.' It specifies the verb ('Get'), resource ('download URL for an icon'), and key features (color, size, formats). However, it does not explicitly differentiate from sibling tools like 'get_icon' or 'search_icons', which might offer overlapping functionality, so it falls short of a perfect score.

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

Usage Guidelines3/5

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

The description provides some implied usage context: it mentions 'Free API access is limited to public domain icons only,' which hints at when to use it (for public domain icons) and potential limitations. However, it does not explicitly state when to use this tool versus alternatives like 'get_icon' or 'search_icons,' nor does it provide clear exclusions or prerequisites beyond the free API note. This leaves gaps in guidance for the agent.

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/sgup/noun-project-mcp'

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