Skip to main content
Glama
delano
by delano

get_api_collection

Retrieve a specific API collection using its API ID and collection ID. Optionally specify a version ID for API viewers.

Instructions

Get a specific collection from an API

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
apiIdYesAPI ID
collectionIdYesCollection ID
versionIdNoVersion ID (required for API viewers)

Implementation Reference

  • The getApiCollection method that executes the 'get_api_collection' tool logic. It validates that apiId and collectionId are provided, then makes a GET request to /apis/{apiId}/collections/{collectionId} with optional query params.
    async getApiCollection(args: any): Promise<ToolCallResponse> {
      if (!args.apiId || !args.collectionId) {
        throw new McpError(ErrorCode.InvalidParams, 'apiId and collectionId are required');
      }
      const { apiId, collectionId, ...params } = args;
      const response = await this.client.get(`/apis/${apiId}/collections/${collectionId}`, { params });
      return this.createResponse(response.data);
    }
  • Schema definition for the 'get_api_collection' tool. Defines inputSchema with properties: apiId (string, required), collectionId (string, required), and versionId (string, optional).
      name: 'get_api_collection',
      description: 'Get a specific collection from an API',
      inputSchema: {
        type: 'object',
        properties: {
          apiId: {
            type: 'string',
            description: 'API ID',
          },
          collectionId: {
            type: 'string',
            description: 'Collection ID',
          },
          versionId: {
            type: 'string',
            description: 'Version ID (required for API viewers)',
          },
        },
        required: ['apiId', 'collectionId'],
      },
    },
  • Case statement in the tool dispatch that routes 'get_api_collection' to the getApiCollection handler method.
    case 'get_api_collection':
      return await this.getApiCollection(args);
  • The getToolDefinitions method that returns TOOL_DEFINITIONS, which includes the definition for 'get_api_collection' from definitions.ts.
    getToolDefinitions(): ToolDefinition[] {
      return TOOL_DEFINITIONS;
    }
  • BasePostmanTool base class that provides the shared HTTP client (AxiosInstance) used by ApiTools to make Postman API requests.
    export class BasePostmanTool {
      /**
       * Protected HTTP client for making API requests
       * All derived classes should use this for Postman API calls
       */
      protected readonly client: AxiosInstance;
    
      constructor(
        apiKey: string | null,
        options: PostmanToolOptions = {},
        existingClient?: AxiosInstance
      ) {
        const baseURL = options.baseURL || 'https://api.getpostman.com';
    
        if (existingClient) {
Behavior2/5

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

With no annotations, the description must disclose behavioral traits. It only states the operation without mentioning read-only nature, side effects, permissions, or error handling. The read-only implication is weak and not explicit.

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 a single sentence that is concise and front-loaded with the verb. However, it may be too brief, missing useful context that could be added without verbosity.

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 lack of output schema, the description should explain what is returned, but it does not. It also fails to differentiate from similar sibling tools like 'get_collection', making the overall context incomplete.

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 input schema already covers all three parameters with descriptions (100% coverage). The description adds no additional meaning beyond the schema, so a baseline score of 3 is appropriate.

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 'Get' and the resource 'collection from an API'. It distinguishes from siblings like 'get_collection' by specifying the API context, but does not explicitly explain the difference between API collections and regular collections, leaving some ambiguity.

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 'get_collection' or 'list_collections'. The description lacks any context for appropriate usage or exclusion criteria.

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/delano/postman-mcp-server'

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