generate_mock_data
Generate realistic mock data for API endpoints using Swagger/OpenAPI specifications to populate Postman collections, test cases, and documentation.
Instructions
Generate realistic mock/sample data from an endpoint's request or response schema. Useful for populating Postman, tests, or documentation.
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": {
"source": "<source>",
"path": "<path>",
"method": "<method>",
"target": "<target>"
},
"name": "generate_mock_data"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | Swagger/OpenAPI spec source: URL (https://...) or local file path (/path/to/spec.json, ./spec.yaml) | |
| path | Yes | Endpoint path, e.g. /api/orders | |
| method | Yes | HTTP method | |
| target | Yes | Generate data for "request" body or "response" body | |
| response_code | No | Response status code (default: first 2xx). Only used when target="response" | |
| count | No | Number of mock objects to generate (default: 1) | |
| format | No | Output format (default: json) | |
| locale | No | Locale for generated names/addresses (default: en) | |
| use_examples | No | Prefer example values from spec (default: true) | |
| auth_header | No | Authorization header value, e.g. "Bearer eyJ..." or "Basic dXNlcjpwYXNz" | |
| headers | No | Additional HTTP headers as key-value pairs, e.g. {"X-API-Key": "abc123"} |