Ragex.API.OpenAPI (Ragex v0.18.2)

View Source

Generates an OpenAPI 3.0 specification from the MCP tool definitions.

The spec is generated lazily from Tools.list_tools() and cached in a persistent term for fast subsequent access.

Served at GET /api/openapi.json.

Summary

Functions

Clear the cached spec (useful after tool definitions change).

Generate the full OpenAPI 3.0 specification.

Functions

clear_cache()

Clear the cached spec (useful after tool definitions change).

generate()

@spec generate() :: map()

Generate the full OpenAPI 3.0 specification.

Each MCP tool becomes a POST /api/tools/{tool_name} endpoint with the tool's inputSchema as the request body schema.