src.tools.core.base_tool.BaseTool
Abstract base class for all tools in the system.
Provides the foundation for tool implementation with standard interfaces for execution, definition retrieval, and output parsing.
Source code in src/tools/core/base_tool.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
|
execute(context=None, **kwargs)
abstractmethod
async
Execute the tool's main functionality.
Source code in src/tools/core/base_tool.py
24 25 26 27 |
|
get_definition()
Get the tool's OpenAI-compatible definition.
Returns:
Name | Type | Description |
---|---|---|
Tool |
Tool
|
Tool definition including type, function details and parameters. |
Source code in src/tools/core/base_tool.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
|
get_tool_specific_instruction()
Get formatted tool-specific instruction.
Source code in src/tools/core/base_tool.py
55 56 57 |
|
parse_output(output)
abstractmethod
Parse the tool's output.
Source code in src/tools/core/base_tool.py
50 51 52 53 |
|