Skip to main content
Tools give your agents the ability to interact with external systems, perform calculations, access APIs, and more. Agentor provides multiple ways to create and use custom tools.

Quick Start

Create a simple tool using the @function_tool decorator:

Tool Creation Methods

Function Tools

The simplest way to create tools is with decorated functions:
Key points:
  • Function name becomes the tool name
  • Docstring becomes the tool description (helps the LLM understand when to use it)
  • Type hints are required for parameters
  • Return type should be str or JSON-serializable

BaseTool Classes

For more complex tools with multiple capabilities:

Dynamic Tools with from_function

Create tools dynamically from any function:

Using Built-in Tools

Agentor comes with pre-built tools. Reference them by name:
Available built-in tools:
  • get_weather - Weather information
  • calculator - Basic arithmetic
  • web_search - Internet search
  • And more in the registry

Real-World Tool Examples

API Integration Tool

Database Tool

File Operations Tool

Tool Best Practices

Serving Tools as MCP Servers

You can serve any BaseTool as an MCP server:
This makes your tool available to any MCP client. See Building MCP Servers for more details.

Next Steps

Last modified on May 5, 2026