import_openapi
Import a full OpenAPI or Swagger spec from a JSON or YAML string to create or update API endpoints and schemas in bulk.
Instructions
Import a full OpenAPI/Swagger spec (JSON or YAML string) into the project. Use this to create or update endpoints and schemas in bulk. To import from a URL use import_endpoints_from_url instead.
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": {
"input": "<input>"
},
"name": "import_openapi"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | OpenAPI spec as a raw JSON or YAML string (Swagger 2.0, OpenAPI 3.0, or 3.1) | |
| targetSchemaFolderId | No | Folder ID where imported schemas will be placed (root if omitted) | |
| targetEndpointFolderId | No | Folder ID where imported endpoints will be placed (root if omitted) | |
| schemaOverwriteBehavior | No | How to handle existing schemas (default: OVERWRITE_EXISTING) | |
| deleteUnmatchedResources | No | Delete endpoints/schemas not present in the imported spec (default: false) | |
| endpointOverwriteBehavior | No | How to handle existing endpoints (default: OVERWRITE_EXISTING) |