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

Two built-in tools can be referenced by string name:
  • get_weather — current weather for a city. Needs WEATHER_API_KEY
  • current_datetime — the current date and time
Any other string raises ValueError: Tool <name> not found. Agentor’s other built-in tools are classes you import and instantiate — CalculatorTool, GitHubTool, GmailTool, SlackTool, and more in the tools reference.
Provider-hosted tools such as web search are not supported. Agentor runs its own agent loop, so a tool whose body lives on the provider has nothing to invoke. Write a function tool that calls a search API instead.

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 August 28, 2026