Implement automatic tool discovery from OpenAPI specifications, enabling
core-ai to dynamically use infrastructure management endpoints without
manual tool definitions.
Changes:
- Add OpenAPIToolDiscovery class for spec parsing and tool generation
- Fetches OpenAPI specs from configurable endpoints
- Generates executable tool functions from API operations
- Creates properly formatted tool schemas for agent use
- Async HTTP client for endpoint execution
- Update tool registry to support OpenAPI tools
- Optional include_openapi parameter in get_all_tools()
- Async loading of dynamic tools
- Merges local and OpenAPI tools seamlessly
- Add OpenAPI configuration settings
- openapi_endpoints: Comma-separated spec URLs
- openapi_enabled: Feature flag for tool discovery
- Default: http://core-api:8083/openapi.json
Architecture:
- Core tools (local.py): Always available essentials (web_search, calculate)
- OpenAPI tools: Infrastructure/automation from core-api dynamically discovered
Benefits:
- Auto-discovers new endpoints as core-api evolves
- No manual tool definition needed for REST APIs
- Maintains single source of truth (OpenAPI spec)
- Enables agent to manage infrastructure via discovered tools
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>