ToolConfig class to customize tool behavior within the framework:
Available ToolConfig Parameters
The following parameters are supported, with version compatibility noted:
| Name | Type | Description | When to Use | Default Value |
|---|---|---|---|---|
one_call_at_a_time | bool | Prevents concurrent execution for a specific tool. If you want to adjust parallel tool calling for all tools, prefer configuring model_settings=ModelSettings(parallel_tool_calls=...). Use this per-tool setting when you need strict sequencing. | Use for database operations, API calls with rate limits, or actions that depend on previous results. | False |
strict | bool | Enables strict mode, which ensures the agent will always provide perfect tool inputs that 100% match your schema. Has limitations. See OpenAI Docs. | Use for mission-critical tools or tools that have nested Pydantic model schemas. | False |
Usage
To use one of the available parameters, simply add aclass ToolConfig block to your tool class: