Skip to main content
Glama
sgup
by sgup

search_collections

Find icon collections on The Noun Project by entering search terms, with options to filter results and control pagination for efficient browsing.

Instructions

Search for collections on The Noun Project. Returns a list of collections matching the search term.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch term for collections (e.g., "winter", "business", "animals")
blacklistNoSet to 1 to remove results matching terms or IDs in blacklist
limitNoMaximum number of results to return
prev_pageNoToken for paging to the previous page
next_pageNoToken for paging to the next page

Implementation Reference

  • The core handler function implementing the search_collections tool logic. It constructs query parameters from input, authenticates with OAuth, and fetches collection search results from the Noun Project API /v2/collection endpoint.
    async searchCollections(params: SearchCollectionsParams) {
      const { query, ...rest } = params;
      const queryParams = new URLSearchParams({
        query,
        ...Object.fromEntries(
          Object.entries(rest)
            .filter(([_, v]) => v !== undefined)
            .map(([k, v]) => [k, String(v)])
        ),
      });
    
      const url = `${BASE_URL}/v2/collection?${queryParams}`;
      const headers = this.oauth.getHeaders(url);
    
      const response = await this.client.get('/v2/collection', {
        params: Object.fromEntries(queryParams),
        headers,
      });
    
      return response.data;
    }
  • MCP tool input schema defining parameters for search_collections, including query (required), optional filters like limit, blacklist, and pagination tokens.
    inputSchema: {
      type: 'object',
      properties: {
        query: {
          type: 'string',
          description: 'Search term for collections (e.g., "winter", "business", "animals")',
        },
        blacklist: {
          type: 'number',
          enum: [0, 1],
          description: 'Set to 1 to remove results matching terms or IDs in blacklist',
        },
        limit: {
          type: 'number',
          description: 'Maximum number of results to return',
        },
        prev_page: {
          type: 'string',
          description: 'Token for paging to the previous page',
        },
        next_page: {
          type: 'string',
          description: 'Token for paging to the next page',
        },
      },
      required: ['query'],
    },
  • src/tools.ts:98-129 (registration)
    Registration of the search_collections tool in the TOOLS array, which is returned by the ListTools handler.
    {
      name: 'search_collections',
      description:
        'Search for collections on The Noun Project. Returns a list of collections matching the search term.',
      inputSchema: {
        type: 'object',
        properties: {
          query: {
            type: 'string',
            description: 'Search term for collections (e.g., "winter", "business", "animals")',
          },
          blacklist: {
            type: 'number',
            enum: [0, 1],
            description: 'Set to 1 to remove results matching terms or IDs in blacklist',
          },
          limit: {
            type: 'number',
            description: 'Maximum number of results to return',
          },
          prev_page: {
            type: 'string',
            description: 'Token for paging to the previous page',
          },
          next_page: {
            type: 'string',
            description: 'Token for paging to the next page',
          },
        },
        required: ['query'],
      },
    },
  • MCP server tool call dispatcher case for search_collections, invoking the API handler and formatting the JSON response.
    case 'search_collections': {
      const result = await api.searchCollections(args as any);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • TypeScript interface defining input parameters for the searchCollections method, matching the tool schema.
    export interface SearchCollectionsParams {
      query: string;
      blacklist?: 0 | 1;
      limit?: number;
      prev_page?: string;
      next_page?: string;
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the return type ('list of collections') but lacks details on permissions, rate limits, pagination behavior (implied by parameters but not explained), or error handling. This is a significant gap for a search tool with multiple parameters.

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 two concise sentences that efficiently convey the tool's purpose and outcome. It's front-loaded with the main action and avoids unnecessary details, though it could be slightly more structured by explicitly mentioning key parameters like pagination.

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 5 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain the behavioral aspects (e.g., how pagination works with 'prev_page' and 'next_page'), return format details, or error cases, leaving gaps for the agent to navigate this search tool effectively.

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 fully documents all parameters. The description adds no additional meaning beyond implying search functionality, which is already clear from the schema. This meets the baseline of 3 for high schema coverage without extra value.

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 action ('Search for collections') and resource ('on The Noun Project'), with the outcome ('Returns a list of collections matching the search term'). It distinguishes from siblings like 'search_icons' by specifying collections, but doesn't explicitly contrast with 'get_collection' or others, keeping it at 4 rather than 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?

No guidance is provided on when to use this tool versus alternatives like 'search_icons' or 'get_collection'. The description only states what it does, not when it's appropriate, leaving the agent to infer usage from context without explicit direction.

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