rllm.tools module exposes the data types (Tool, ToolCall,
ToolOutput) the rLLM parser uses when reading tool calls out of model
responses, plus a small registry. The higher-level MultiTool /
ToolEnvironment wrappers that the old Workflow path used have been
removed.
For a modern tool-using agent, the recommended pattern is to declare
tools as plain Python callables and pass an OpenAI-spec
tools list
directly to the chat-completions API — see
cookbooks/finqa/finqa_tools.py
for a worked example with four tools, native OpenAI function calling,
and a process-wide SQLite store. Use the data types below if you need
to parse tool calls out of a raw text response (e.g. for non-native
tool-call formats); see Parsers.Tool
Base class for all tools.Constructor
Name of the tool. Required if
function is not provided.Description of the tool’s purpose. Required if
function is not provided.Function to convert to tool format. If provided, name and description are auto-extracted from docstring.
Properties
Tool schema in OpenAI function calling format.
Methods
forward
Synchronous implementation of tool functionality.Tool execution result.
async_forward
Asynchronous implementation of tool functionality.call
Make the tool callable.Whether to use async implementation. Auto-detects if None.
ToolOutput
Dataclass for tool execution results.Fields
Name of the tool that produced this output.
The tool’s output data.
Error message if execution failed.
Additional metadata about the execution.
Methods
to_string
Convert output to string representation.ToolCall
Dataclass representing a tool call.Fields
Name of the tool to call.
Arguments to pass to the tool.
ToolRegistry
Singleton registry for managing tools.Methods
register
Register a tool class.Name to register the tool under.
Tool class to register.
register_all
Register multiple tools at once.get
Get a tool class by name.Tool class if found, None otherwise.
instantiate
Instantiate a tool by name.Name of the tool to instantiate.
Arguments to pass to tool constructor.

