How to Create a Simple Tool Function
1
Define Tool Function
2
Use with Agent
How to Create Tools with Multiple Parameters
1
Define Multi-Parameter Tool
2
Use with Agent
How to Create Tools as Classes
1
Define Tool Class
2
Use Class Methods as Tools
How to Create Async Tools
1
Define Async Tool
2
Use with Async Agent
Tool Function Requirements
| Requirement | Description |
|---|---|
| Type hints | All parameters must have type hints |
| Docstring | Must include description and Args section |
| Return type | Must specify return type |
| Serializable | Return value must be JSON-serializable |

