Corral
Learn > Documentation

Tools: OpenAPI Connections

OpenAPI integration lets you connect agents to any API that has an OpenAPI 3.0 specification. Corral imports the spec, generates callable tools from each endpoint, and makes them available to your agents.


How It Works

  1. You provide the URL of an OpenAPI 3.0 specification
  2. Corral imports the spec and generates a tool for each operation
  3. Those tools become available to the agent alongside built-in and MCP tools
  4. When the agent calls an OpenAPI tool, Corral handles serialization, HTTP transport, and response parsing

Adding an OpenAPI Connection

Via the Admin Console

  1. Navigate to your app in the admin console
  2. Open the Connections tab
  3. Select OpenAPI
  4. Add a new connection:
    • Spec URL — the URL of the OpenAPI 3.0 specification (JSON or YAML)
  5. Save. Tools are generated from the spec and available in test immediately.

Via API

POST /api/projects/{slug}/connections/openapi
PUT  /api/projects/{slug}/connections/openapi

What Gets Generated

Each operation in the OpenAPI spec becomes a tool with:

  • Name derived from the operation ID
  • Description from the operation’s summary or description
  • Parameters mapped from the spec’s request schema
  • Return type mapped from the response schema

The agent sees these as regular tools and can call them based on the user’s request and the tool descriptions.


Scoping

OpenAPI connections, like MCP connections, are scoped to a project and app. Each app has its own set of API connections.


Test vs. Published

OpenAPI connections have test and published configurations. Adding a connection makes it available in Build & Test immediately. Publish to make it available in production.


Use Cases

  • Internal APIs — connect agents to your internal services (CRM, ticketing, inventory, etc.) by pointing to their OpenAPI specs
  • Third-party APIs — connect to any external service that publishes an OpenAPI spec
  • Custom tools — build a lightweight API server that exposes your custom business logic as OpenAPI endpoints, then connect it to Corral

Considerations

This section is a work in progress.