Skip to main content
Glama
sgup
by sgup

get_collection

Retrieve metadata and icons from a specific collection by ID, with options for thumbnail size, SVG inclusion, and result limits.

Instructions

Get a collection by ID. Returns collection metadata and the icons it contains.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
collection_idYesThe unique ID of the collection
thumbnail_sizeNoThumbnail size to return for icons (42, 84, or 200 pixels)
include_svgNoSet to 1 to include SVG URLs in the response
limitNoMaximum number of icons to return from the collection

Implementation Reference

  • Core handler function that executes the get_collection tool logic: fetches collection data from Noun Project API using OAuth-authenticated GET request, processes query parameters.
    async getCollection(params: GetCollectionParams) {
      const { collection_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/collection/${collection_id}${
        queryString ? `?${queryString}` : ''
      }`;
      const headers = this.oauth.getHeaders(url);
    
      const response = await this.client.get(`/v2/collection/${collection_id}`, {
        params: queryParams.toString() ? Object.fromEntries(queryParams) : undefined,
        headers,
      });
    
      return response.data;
    }
  • TypeScript interface defining input parameters for the getCollection handler.
    export interface GetCollectionParams {
      collection_id: number;
      thumbnail_size?: 42 | 84 | 200;
      include_svg?: 0 | 1;
      limit?: number;
    }
  • src/tools.ts:69-97 (registration)
    MCP tool registration object including name, description, and input schema validation.
    {
      name: 'get_collection',
      description:
        'Get a collection by ID. Returns collection metadata and the icons it contains.',
      inputSchema: {
        type: 'object',
        properties: {
          collection_id: {
            type: 'number',
            description: 'The unique ID of the collection',
          },
          thumbnail_size: {
            type: 'number',
            enum: [42, 84, 200],
            description: 'Thumbnail size to return for icons (42, 84, or 200 pixels)',
          },
          include_svg: {
            type: 'number',
            enum: [0, 1],
            description: 'Set to 1 to include SVG URLs in the response',
          },
          limit: {
            type: 'number',
            description: 'Maximum number of icons to return from the collection',
          },
        },
        required: ['collection_id'],
      },
    },
  • src/index.ts:78-88 (registration)
    MCP server request handler dispatching 'get_collection' tool calls to the api.getCollection implementation.
    case 'get_collection': {
      const result = await api.getCollection(args as any);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
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 mentions the return content but lacks details on permissions, rate limits, error handling, or whether it's a read-only operation. 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 appropriately sized and front-loaded, consisting of two concise sentences that directly state the tool's purpose and return value without any unnecessary information. Every sentence earns its place by providing essential context.

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

Completeness2/5

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

Given the complexity of a tool with 4 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain the return format beyond high-level mentions, leaving gaps in understanding how to interpret results like metadata structure or icon data, which is inadequate for effective tool use.

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 description adds no parameter semantics beyond what the input schema provides, which has 100% coverage with clear descriptions for all parameters. The baseline is 3 when the schema does the heavy lifting, as the description doesn't compensate with additional context like default values or usage examples.

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 with a specific verb ('Get') and resource ('collection by ID'), and mentions what it returns ('collection metadata and the icons it contains'). However, it doesn't explicitly distinguish this tool from its siblings like 'search_collections' or 'get_icon', which would require a 5.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to choose 'get_collection' over 'search_collections' for finding collections or 'get_icon' for individual icons, nor does it discuss prerequisites or exclusions.

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