AgentToolResult Class
Represents the result of a tool call.
Inheritance
System.Object
AgentToolResult
Namespace: Syncfusion.AI.AgentTools.Core
Assembly: Syncfusion.DocumentSDK.AI.AgentTools.dll
Syntax
public class AgentToolResult : Object
Constructors
AgentToolResult()
Declaration
public AgentToolResult()
Properties
Data
Gets or sets additional data returned by the tool.
Declaration
public object Data { get; set; }
Property Value
| Type |
|---|
| System.Object |
Error
Gets or sets the error message if the operation failed.
Declaration
public string Error { get; set; }
Property Value
| Type |
|---|
| System.String |
Message
Gets or sets the result message.
Declaration
public string Message { get; set; }
Property Value
| Type |
|---|
| System.String |
Success
Gets or sets whether the operation succeeded.
Declaration
public bool Success { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
Methods
Fail(String)
Creates a failed result.
Declaration
public static AgentToolResult Fail(string error)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | error |
Returns
| Type |
|---|
| AgentToolResult |
Ok(String, Object)
Creates a successful result.
Declaration
public static AgentToolResult Ok(string message, object data = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | message | |
| System.Object | data |
Returns
| Type |
|---|
| AgentToolResult |