create_collection_request
Add a new HTTP request to a specified Postman collection, optionally within a folder, by providing its name, method, and URL.
Instructions
Create a new request in a collection
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| collection_id | Yes | Collection ID | |
| folder_id | No | Optional folder ID to create request in | |
| request | Yes | Request details |
Implementation Reference
- The handler function for 'create_collection_request'. It performs a POST to /collections/{collection_id}/requests with the request body, optionally including folder_id as a query parameter.
async createCollectionRequest(args: any): Promise<ToolCallResponse> { const response = await this.client.post( `/collections/${args.collection_id}/requests`, args.request, { params: args.folder_id ? { folder_id: args.folder_id } : undefined } ); return this.createResponse(response.data); } - The input schema/tool definition for 'create_collection_request'. Validates collection_id (required), folder_id (optional), and request (required) which contains name, method, and url properties.
{ name: 'create_collection_request', description: 'Create a new request in a collection', inputSchema: { type: 'object', properties: { collection_id: { type: 'string', description: 'Collection ID', }, folder_id: { type: 'string', description: 'Optional folder ID to create request in', }, request: { type: 'object', description: 'Request details', properties: { name: { type: 'string' }, method: { type: 'string' }, url: { type: 'string' } } } }, required: ['collection_id', 'request'], }, }, - src/tools/api/collections/index.ts:53-54 (registration)The routing/registration case statement in handleToolCall() that dispatches 'create_collection_request' to the createCollectionRequest handler method.
case 'create_collection_request': return await this.createCollectionRequest(args); - src/tools/api/collections/index.ts:20-22 (registration)The CollectionTools class returns TOOL_DEFINITIONS (which includes create_collection_request) via getToolDefinitions(). The class is instantiated in server.ts and its definitions are registered with the MCP server.
getToolDefinitions(): ToolDefinition[] { return TOOL_DEFINITIONS; }