get_collection
Retrieve details of a Postman collection by providing its collection ID. Optionally use an access key for read-only access or request a minimal data subset.
Instructions
Get details of a specific collection
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| collection_id | Yes | Collection ID | |
| access_key | No | Collection's read-only access key. Using this query parameter does not require an API key. | |
| model | No | Return minimal collection data (only root-level request and folder IDs) |
Implementation Reference
- The handler function for the 'get_collection' tool. It destructures collection_id from args, passes remaining params (access_key, model) as query parameters to a GET /collections/{collection_id} API call, and returns the response data.
async getCollection(args: any): Promise<ToolCallResponse> { const { collection_id, ...params } = args; const response = await this.client.get(`/collections/${collection_id}`, { params }); return this.createResponse(response.data); } - The tool definition registration (input schema) for 'get_collection'. Specifies required collection_id, optional access_key and model (enum 'minimal') parameters.
{ name: 'get_collection', description: 'Get details of a specific collection', inputSchema: { type: 'object', properties: { collection_id: { type: 'string', description: 'Collection ID', }, access_key: { type: 'string', description: "Collection's read-only access key. Using this query parameter does not require an API key.", }, model: { type: 'string', enum: ['minimal'], description: 'Return minimal collection data (only root-level request and folder IDs)', }, }, required: ['collection_id'], }, - src/types/collection.ts:12-15 (schema)TypeScript interface GetCollectionArgs defining the typed arguments: extends CollectionIdArg with optional access_key and model fields.
export interface GetCollectionArgs extends CollectionIdArg { access_key?: string; model?: 'minimal'; } - src/tools/api/collections/index.ts:35-36 (registration)The case branch in handleToolCall that dispatches 'get_collection' to the getCollection handler method.
case 'get_collection': return await this.getCollection(args); - src/tools/api/collections/index.ts:20-22 (registration)The getToolDefinitions method returning all collection tool definitions, including 'get_collection'.
getToolDefinitions(): ToolDefinition[] { return TOOL_DEFINITIONS; }