import_api_spec
Import an OpenAPI 3.x document (as JSON), a Postman v2.x collection (JSON) or a curl command into a new collection, or into collection_id. All or nothing, and plan limits are checked first. Credentials are never imported (they become variables). Convert YAML to JSON before sending.
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": {
"format": "<format>",
"content": "<content>"
},
"name": "import_api_spec"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Name for the new collection. | |
| format | Yes | What `content` is: an OpenAPI 3.x document, a Postman v2.x collection, a HAR file or a curl command. | |
| content | Yes | The document (object or JSON string), or the curl command, e.g. curl -X POST https://api.example.com/v1/charges. | |
| collection_id | No | Add to this collection instead of creating one. |