Generate a collection from spec
generateCollectionConvert an existing API specification into a collection. Supply spec ID, name, and options; the response includes a polling link to monitor task progress.
Instructions
Creates a collection from the given API specification. The specification must already exist or be created before it can be used to generate a collection. The response contains a polling link to the task status.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"specId": "<specId>",
"elementType": "<elementType>",
"name": "<name>",
"options": "<options>"
},
"name": "generateCollection"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The generated collection's name. | |
| specId | Yes | The spec's ID. | |
| options | Yes | The advanced creation options and their values. For more details, see Postman's [OpenAPI to Postman Collection Converter OPTIONS documentation](https://github.com/postmanlabs/openapi-to-postman/blob/develop/OPTIONS.md). These properties are case-sensitive. | |
| elementType | Yes | The `collection` element type. |