Skip to main content

Overview

Function tools are the simplest way to create custom tools. Decorate any Python function with @tool to make it available to your agents.

Example

Async Functions

Async functions are fully supported for I/O-bound operations:

Sync and Async Versions

For libraries that need both sync and async support, create both versions:

Tool Configuration

Configure tool behavior using decorator parameters:
See Tool Attributes for all configuration options.