Import OpenAPI specification
import_openapi_specGenerate a Postman v2.1 collection from an OpenAPI or Swagger spec, or sync an existing collection with a newer spec version to keep requests aligned.
Instructions
Generates a Postman v2.1 collection from OpenAPI 3.0/3.1/Swagger 2.0 (JSON/YAML), or syncs an existing collection with a new spec version. Deterministic: uses openapi-to-postmanv2 without a model.
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": {
"specSource": "<specSource>",
"outputPath": "<outputPath>"
},
"name": "import_openapi_spec"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | create: new collection; sync: update an existing collection | create |
| overwrite | No | Allow replacing outputPath | |
| outputPath | Yes | Path for the resulting collection | |
| specSource | Yes | Local path (.json/.yaml/.yml) or https URL to an OpenAPI/Swagger spec | |
| folderStrategy | No | How to group items into folders | Tags |
| baseUrlVariable | No | Collection variable name for the base URL | baseUrl |
| collectionSource | No | Collection to sync (required when mode=sync) | |
| includeDeprecated | No | Include deprecated operations | |
| generateBasicTests | No | Add deterministic contract tests | |
| parametersResolution | No | Use spec examples or generate values from schemas | Example |
| deleteOrphanedRequests | No | Sync only: remove requests absent from the spec |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | ||
| spec | Yes | ||
| sync | No | ||
| folders | Yes | ||
| warnings | Yes | ||
| variables | Yes | ||
| outputPath | Yes | ||
| totalItems | Yes | ||
| validation | Yes | ||
| testsGenerated | Yes |