import_mocks
Import API mocks from OpenAPI, Postman, HAR, WireMock, cURL, or mockd YAML/JSON. Preview with dryRun, use file for large specs.
Instructions
Import mocks from inline content or a file on the mockd server's filesystem. Supports OpenAPI, Postman, HAR, WireMock, cURL, and mockd YAML/JSON formats. Format is auto-detected if not specified. Use dryRun=true to preview without applying. Use the file parameter for large specs that are too large for inline content.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "import_mocks"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | No | Mock definition content (YAML, JSON, OpenAPI spec, Postman collection, HAR, WireMock, or cURL) | |
| dryRun | No | Parse and validate without applying. Returns a summary of what would be imported. | |
| file | No | Path to a file on the mockd server's filesystem to import. Use this for large specs (OpenAPI, Postman, etc.) that are too large for inline content. Mutually exclusive with content. | |
| format | No | Format hint for parsing | auto |
| replace | No | Replace all existing mocks (true) or merge with existing (false) |