generate_request_example
Create curl, axios, or fetch request code from a cached Swagger/OpenAPI operation to test or integrate an API endpoint.
Instructions
Generate curl, axios, or fetch code from one cached operation.
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": {
"workspace": "<workspace>",
"service": "<service>"
},
"name": "generate_request_example"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | ||
| format | No | curl | |
| method | No | ||
| baseUrl | No | Optional API base URL. Falls back to spec server URL. | |
| service | Yes | ||
| workspace | Yes | Absolute path to the business project that owns .swagger-mcp. | |
| operationId | No |