Skip to main content
Glama
damonxue

OSSInsight MCP Server

list_collections

Retrieve available repository collections to analyze GitHub data for open source insights. Supports pagination with page and per-page parameters.

Instructions

List all available repository collections

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number, starting from 1
per_pageNoNumber of results per page, default is 20

Implementation Reference

  • Core handler function that fetches the list of collections from OSSInsight API, with fallback to web URL.
    async function listCollections(page: number = 1, perPage: number = 20): Promise<any> {
      try {
        // Get collections from API if available
        const collectionsData = await apiRequest('/collections', { 
          page, 
          per_page: perPage 
        });
        
        // Get web page URL for reference
        const webUrl = `${OSSINSIGHT_WEB_URL}/collections`;
        
        return {
          collections: collectionsData,
          web_url: webUrl
        };
      } catch (error) {
        // If API fails, provide just the collections web URL
        console.error(`API request failed: ${error}`);
        
        return {
          message: "API request failed. Please visit the web URL to browse collections.",
          web_url: `${OSSINSIGHT_WEB_URL}/collections`
        };
      }
    }
  • Zod schema defining optional input parameters page and per_page for pagination.
    export const ListCollectionsParamsSchema = z.object({
      page: z.number().optional().describe("Page number, starting from 1"),
      per_page: z.number().optional().describe("Number of results per page, default is 20")
    });
  • index.ts:302-306 (registration)
    Tool registration in the listTools response, specifying name, description, and input schema.
    {
      name: "list_collections",
      description: "List all available repository collections",
      inputSchema: zodToJsonSchema(ListCollectionsParamsSchema)
    },
  • Dispatcher handler case within CallToolRequest that parses args, calls listCollections, and formats response.
    case "list_collections": {
      const args = ListCollectionsParamsSchema.parse(request.params.arguments);
      const collections = await listCollections(args.page, args.per_page);
      return { content: [{ type: "text", text: JSON.stringify(collections, null, 2) }] };
    }
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. While 'List all available repository collections' implies a read-only operation, it doesn't mention pagination behavior (implied by parameters), rate limits, authentication requirements, or what format the results will be in. For a tool with no annotation coverage, this is insufficient.

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 a single, efficient sentence that states exactly what the tool does with zero wasted words. It's appropriately sized for a simple list operation and front-loads the essential information.

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?

For a simple list tool with 2 documented parameters and no output schema, the description is minimally adequate but has clear gaps. It doesn't explain the return format, pagination behavior, or how this tool differs from siblings. Without annotations, the description should provide more behavioral context about what 'listing' entails.

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 fully documents both parameters. The description doesn't add any parameter semantics beyond what's in the schema - it doesn't explain how pagination works, default values, or constraints. Baseline 3 is appropriate when the schema does all the parameter documentation work.

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 verb ('List') and resource ('repository collections'), making the purpose immediately understandable. However, it doesn't differentiate this tool from its sibling 'get_collection' which presumably retrieves a specific collection rather than listing all available ones.

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 like 'get_collection' or 'natural_language_query'. There's no mention of prerequisites, appropriate contexts, or limitations that would help an agent choose between available options.

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/damonxue/mcp-ossinsight'

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