fetch_swagger
Fetch and parse OpenAPI/Swagger specifications from URLs, local files, or protected sources to enable API test case generation.
Instructions
Fetch and parse an OpenAPI/Swagger specification. Supports:
Public URLs: https://api.example.com/swagger.json
Internal URLs (accessible from user's machine/VPN): https://internal-api.company.com/docs/swagger.json
Local files: /path/to/swagger.json, ./api-spec.yaml
Auth-protected specs: pass auth_header for Bearer/Basic/API-Key auth
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>"
},
"name": "fetch_swagger"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | Swagger/OpenAPI spec source: URL (https://...) or local file path (/path/to/spec.json, ./spec.yaml) | |
| 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"} |