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
Decorator that wraps the OpenAI Agents SDK@function_tool and registers the tool in the global AgentRegistry. This allows tools defined in separate files to be discovered by the Studio and CLI, and retrieved using get_tools().
Signature
Usage
The@tool decorator can be used with or without parentheses:
Without parentheses (simple case)
With parentheses (custom configuration)
Parameters
The function to decorate. When using
@tool without parentheses, this is automatically provided. When using @tool() with parentheses, this is None initially.Additional keyword arguments passed to the underlying
@function_tool decorator from the OpenAI Agents SDK.Common options include:name_override- Override the tool’s name (defaults to function name)description_override- Override the tool’s description (defaults to docstring)
Returns
A
FunctionTool instance from the OpenAI Agents SDK that is also registered in the global AgentRegistry.Examples
Basic tool definition
Tool with type hints
Tool with custom name
Synchronous tool
Tool with complex parameters
Organizing tools in separate files
Define tools in atools/ directory:
See Also
- define_agent() - Create agents that use tools
- get_tools() - Retrieve registered tools by name