Generation and validation of Claude-compatible tools from OpenAPI specifications
Project description
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
pip install openapi-agent-tools
Or directly from the repository:
pip install git+https://github.com/teobaldo33/openapi-agent-tools.git
Usage
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file openapi_agent_tools-0.2.0.tar.gz.
File metadata
- Download URL: openapi_agent_tools-0.2.0.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
252ec779015c901c6199f8611d25999633c0400ab180118e01af1b0beddd303b
|
|
| MD5 |
82f7b2ffb67e75b01836861888ea8a52
|
|
| BLAKE2b-256 |
1b8f12aa006f0ddfc349ac7f71fdeea6a5e0b980ee4705476e91b3a67d732149
|
File details
Details for the file openapi_agent_tools-0.2.0-py3-none-any.whl.
File metadata
- Download URL: openapi_agent_tools-0.2.0-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e3e2c347381bdab70b815e58aef02dd62c37bb5def0ee38f61f35ef886d8b9c
|
|
| MD5 |
49bd31ea4ad54c45862dcd30eb7e8b4e
|
|
| BLAKE2b-256 |
0669b4a3e411978f4fde82fc35735ae1df47e0c00edc108375879010c1e2f722
|