get_collection_forks
Retrieve a list of forks for a Postman collection, with support for pagination, sorting, and direction.
Instructions
Get a list of collection forks
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| collection_id | Yes | Collection ID | |
| cursor | No | Pagination cursor | |
| limit | No | Maximum number of results to return | |
| direction | No | Sort direction | |
| sort | No | Sort field |
Implementation Reference
- Handler function that executes the 'get_collection_forks' tool logic. Makes a GET request to the Postman API endpoint /collections/{collection_id}/forks with pagination params (cursor, limit, direction, sort).
/** * Get a list of collection forks */ async getCollectionForks(args: any): Promise<ToolCallResponse> { const { collection_id, ...params } = args; const response = await this.client.get(`/collections/${collection_id}/forks`, { params: { cursor: params.cursor, limit: params.limit, direction: params.direction, sort: params.sort } }); return this.createResponse(response.data); } - Schema definition for the 'get_collection_forks' tool, specifying name, description, and inputSchema with properties: collection_id (required), cursor, limit, direction (asc/desc), sort (createdAt).
{ name: 'get_collection_forks', description: 'Get a list of collection forks', inputSchema: { type: 'object', properties: { collection_id: { type: 'string', description: 'Collection ID', }, cursor: { type: 'string', description: 'Pagination cursor', }, limit: { type: 'number', description: 'Maximum number of results to return', }, direction: { type: 'string', enum: ['asc', 'desc'], description: 'Sort direction', }, sort: { type: 'string', enum: ['createdAt'], description: 'Sort field', } }, required: ['collection_id'], }, }, - src/tools/api/collections/index.ts:69-73 (registration)Tool dispatch registration in the switch statement of the CollectionTools class. Maps the tool name 'get_collection_forks' to its handler method getCollectionForks().
case 'fork_collection': return await this.forkCollection(args); case 'get_collection_forks': return await this.getCollectionForks(args); case 'merge_collection_fork':