OpenAPI Toolset¶
The OpenAPI toolset automatically generates tools from OpenAPI/Swagger specifications, allowing agents to interact with any API that provides an OpenAPI spec.
Basic Usage¶
Configuration¶
From URL¶
From Local File¶
With Authentication¶
toolsets:
- type: openapi
spec: https://api.example.com/openapi.json
base_url: https://api.example.com/v1
headers:
Authorization: "Bearer ${API_TOKEN}"
Generated Tools¶
Each OpenAPI operation becomes a tool with:
- Name: Derived from
operationIdor path - Description: From operation summary/description
- Parameters: Mapped from path, query, and body parameters
- Return type: Based on response schema
Configuration Reference¶
OpenAPI Toolset¶
Configuration for OpenAPI toolsets.
Tips¶
- Use
namespaceto prefix tool names and avoid collisions - Provide
base_urlif different from spec's server URL - Headers support environment variable substitution