Skip to main content

Interface: ToolResult<T>

Defined in: src/agent/Tool.ts:12

Standardized result type for tool execution.

Type Parameters

T

T = unknown

The type of data returned on success.

Properties

data?

optional data: T

Defined in: src/agent/Tool.ts:16

The result data if successful


error?

optional error: string

Defined in: src/agent/Tool.ts:18

Error message if execution failed


metadata?

optional metadata: Record<string, unknown>

Defined in: src/agent/Tool.ts:20

Additional metadata about the execution


success

success: boolean

Defined in: src/agent/Tool.ts:14

Whether the tool execution succeeded