ClassAgentToolBase
Provides a base class for defining agent tools that can be automatically discovered and exposed as AITool instances.
Definition
Namespace:Telerik.Documents.AI.Tools.Core
Assembly:Telerik.Documents.AI.Tools.Core.dll
Syntax:
public abstract class AgentToolBase
Inheritance: objectAgentToolBase
Derived Classes:
Constructors
AgentToolBase()
Initializes a new instance of the AgentToolBase class.
Declaration
protected AgentToolBase()
Methods
ExecuteWithValidation(Func<CallToolResult>)
Executes the tool logic with license validation. This is the required pattern for all tool implementations. License validation is performed before executing the tool logic, unless already validated via GetTools wrapper.
Declaration
protected static CallToolResult ExecuteWithValidation(Func<CallToolResult> toolLogic)
Parameters
toolLogic
The tool logic to execute after license validation.
Returns
A CallToolResult with the tool result or license error.
GetTools()
Gets all tools as AITool instances, automatically discovering wrapper methods. License validation is performed on every tool invocation.
Declaration
[CLSCompliant(false)]
public IList<AITool> GetTools()
Returns
IList<AITool>