Skip to main content

Tools & Integrations

Creating Custom Tools

0:00
LearnStep 1/4

The @tool Decorator

Creating Tools with @tool

The simplest way to create a custom tool is using the @tool decorator.

Basic Custom Tool

python

Tool with Multiple Arguments

python

Tool Naming Best Practices

python

Docstring Importance

The docstring is critical - agents use it to understand when and how to use the tool:

python