Tools
llm_expose.tools.base
¶
Abstract base class for tool/function-calling support.
BaseTool
¶
Bases: ABC
Legacy interface for optional local tool execution.
Concrete subclasses represent callable tools executed inside this application. The current production path uses LiteLLM MCP tools directly, so this interface is kept primarily for backward compatibility and future local-only integrations.
Remove once local tool execution is either fully implemented or
formally deprecated across public API/docs.
Source code in llm_expose/tools/base.py
9 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 | |
description
abstractmethod
property
¶
Human-readable description of what the tool does.
name
abstractmethod
property
¶
Unique, snake_case name of the tool (used in the LLM's API call).
parameters_schema
abstractmethod
property
¶
JSON-Schema dict that describes the tool's input parameters.
execute(**kwargs)
abstractmethod
async
¶
Invoke the tool with the provided keyword arguments.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**kwargs
|
Any
|
Arguments validated against :attr: |
{}
|
Returns:
| Type | Description |
|---|---|
str
|
The tool's result as a plain string to be passed back to the LLM. |
Source code in llm_expose/tools/base.py
36 37 38 39 40 41 42 43 44 45 | |