Class
AgentToolBase

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:

cs-api-definition
public abstract class AgentToolBase

Inheritance: objectAgentToolBase

Derived Classes: ConvertDocumentsAgentToolMergeDocumentsAgentToolFixedDocumentAgentToolsBaseSpreadProcessingAgentToolsBase

Constructors

AgentToolBase()

Initializes a new instance of the AgentToolBase class.

Declaration

cs-api-definition
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

cs-api-definition
protected static CallToolResult ExecuteWithValidation(Func<CallToolResult> toolLogic)

Parameters

toolLogic

Func<CallToolResult>

The tool logic to execute after license validation.

Returns

CallToolResult

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

cs-api-definition
[CLSCompliant(false)]
public IList<AITool> GetTools()

Returns

IList<AITool>