The generator

OpenAPIToolFactory factory = OpenAPIToolFactory.builder()
    .specUrl("https://api.example.com/openapi.json")
    .baseUrl("https://api.example.com")
    .build();
List tools = factory.generate();
agent.addTools(tools);
Advertisement

Operation → tool

Each OpenAPI operation becomes one tool. operationId becomes the tool name. summary becomes the description.

Advertisement

Auth handling

Bearer/OAuth flows: hook a token provider into the factory. Never hardcode.