Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Evincere/klisk/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Retrieve registered tools by name from the globalAgentRegistry. Use this in your entry point (e.g., main.py) to reference tools defined in separate files under the tools/ directory.
Signature
Parameters
Variable number of tool names to retrieve. Each name should match the name of a function decorated with
@tool (or a custom name specified via name_override).Returns
A list of
FunctionTool instances from the OpenAI Agents SDK, in the same order as the requested names.Errors
RaisesValueError if any requested tool is not found in the registry. The error message indicates which tool is missing and reminds you to ensure it’s decorated with @tool.
Example
Basic usage
Retrieving a single tool
Retrieving multiple tools
Project structure
A typical project structure usingget_tools():
Tool definitions
Main entry point
Important notes
-
Import before using: You must import the module containing the
@tooldecorated function before callingget_tools(). This ensures the tool is registered in theAgentRegistry. -
Tool names: By default, the tool name is the function name. You can override this with
@tool(name_override="custom_name"). -
Error handling: If a tool is not found,
get_tools()raises aValueErrorimmediately. Make sure all tool modules are imported.
See Also
- @tool decorator - Define custom tools
- define_agent() - Create agents that use tools