Skip to main content
Besides standard Pydantic features, you can also use a special ToolConfig class to customize tool behavior within the framework:

Available ToolConfig Parameters

The following parameters are supported, with version compatibility noted:
NameTypeDescriptionWhen to UseDefault Value
one_call_at_a_timeboolPrevents 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
strictboolEnables 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 a class ToolConfig block to your tool class:
class MyCustomTool(BaseTool):
    # ...

    class ToolConfig:
        one_call_at_a_time = True
        strict = False

    async def run(self):
        # ...
I