Metadata-Version: 2.2
Name: openapi_agent_tools
Version: 0.2.0
Summary: Generation and validation of Claude-compatible tools from OpenAPI specifications
Author-email: Théo Tenaguillo <theo.tenaguillo@gmail.com>
License: MIT
Project-URL: Bug Reports, https://github.com/username/openapi-agent-tools/issues
Project-URL: Source, https://github.com/username/openapi-agent-tools
Keywords: openapi,claude,anthropic,ai,tools,api
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Requires-Dist: PyYAML>=5.4.0
Requires-Dist: ruamel.yaml>=0.17.0

# OpenAPI Agent Tools

A library for generating and validating Claude-compatible tools from OpenAPI specifications. I haven't tested it with other models but it should work too as tools are usually defined as JSON Schema

## Installation

```bash
pip install openapi-agent-tools
```

Or directly from the repository:

```bash
pip install git+https://github.com/teobaldo33/openapi-agent-tools.git
```

## Usage

```python
from openapi_agent_tools import (
    generate_tools_from_openapi,
    validate_and_fix_tools
)

# Generate tools from the specification as json or yaml
tools = generate_tools_from_openapi(openapi_spec, base_url)

# Validate and fix tools for Claude compatibility
fixed_tools, failed_tools = validate_and_fix_tools(tools)

print(f"Generated and fixed {len(fixed_tools)} tools")
```

## Features

- **OpenAPI Analysis**: Process OpenAPI specifications to generate Agent-compatible tools
- **Schema Validation**: Check and fix common errors in tool definitions
- **Claude Compatibility**: Adapt schemas to be usable with AI Agents
- **CLI Interface**: Command line utilities for use in scripts

## License

MIT
