Skip to content

OpenAPI Tools

Tools for parsing OpenAPI specs and executing HTTP requests by operation ID.

parse_openapi

Parse an OpenAPI 3.x or Swagger 2.0 spec and return a summary of operations.

InputTypeRequiredDescription
specPathstringyesPath to spec file (JSON or YAML, within scope)

Output: { title, version, servers, operations: [{ operationId, method, path, summary }] }

Supports JSON and YAML formats. $ref pointers are automatically dereferenced. Operations without an operationId get one auto-generated from the method + path.

Capped at 200 operations.


call_api

Execute an HTTP request by operation ID from an OpenAPI spec.

InputTypeRequiredDescription
specPathstringyesPath to spec file
operationIdstringyesOperation ID to invoke
paramsRecord<string, string>noPath and query parameters
bodyunknownnoRequest body (JSON)
headersRecord<string, string>noAdditional headers

Output: { status, headers, body, url }

Security: Only sends requests to hosts listed in the spec's servers array. Requests to unlisted hosts are rejected. Response body capped at 100KB. 30-second timeout.

Released under the MIT License.