- Endpoints must accept and return JSON.
- The specification must include a servers block with exactly one URL. This URL cannot contain parameterization.
- Each path that exposes an endpoint must include an
operationId. This value becomes the tool name. For best results, use snake_case foroperationIdvalues. - Each path that exposes an endpoint must include a description. The agent uses this description to decide when to use the tool and what the tool does.
- The OpenAPI version must be 3.0.
YAML
Importing OpenAPI based tools
To import an OpenAPI tool, run:BASH
Additional features of OpenAPI tools
Securely providing credentials
Securely providing credentials
OpenAPI tools are fully compatible with the watsonx Orchestrate Connections framework. A connection represents a dependency on an external service and provides a way to associate credentials with a tool. Supported authentication methods include Basic, Bearer, API Key, OAuth, and IDP SSO flows.Connections are referenced using an application ID (app_id), which serves as the unique identifier for a connection. Each OpenAPI tool can be associated with only one connection app_id.For more information, see Connections.
Asynchronous tools with callbacks
Asynchronous tools with callbacks
OpenAPI tools are one of the two tool types that support asynchronous operations. These tools perform an action and then poll a status endpoint until the long-running process completes. Unlike synchronous tools, asynchronous tools can exceed the 40-second execution timeout in the UI.To create an asynchronous OpenAPI tool, your OpenAPI specification must include a
callbackUrl header parameter as defined in the OpenAPI Callback Specification.- Use
callbackUrlexactly as the header parameter name; other names are not supported. - The only supported content type for the callback response is
application/json.
YAML
Limitations and considerations
Using OpenAPI tools with your agents is straightforward, but default OpenAPI specifications often perform poorly as agent tools for the following reasons. If any of these issues apply to your use case, consider adjusting your OpenAPI specification or using Python tools instead.- OpenAPI endpoints are designed for developers, not agents.
- Developers can rely on context from other endpoints and external documentation to understand an endpoint’s purpose. Agents cannot. All necessary context must be included within the endpoint itself.
- OpenAPI endpoints often include large sets of input arguments. In contrast, tools should have focused inputs and outputs that resolve a single task. For more information, see Designing agents and tools for best performance .
- Agents require a highly descriptive semantic layer.
- OpenAPI tools do not support
x-ibm-extensions used in older watsonx Orchestrate Skills.

