Interface: ToolSuccess<T>
Defined in: packages/core/src/utils/tool-result.ts:19
Tool Result Helpers
Standard structure for tool return values. Tools can adopt incrementally — these are pure functions with zero coupling to the rest of the SDK.
Example
import { toolResult, toolError, isToolError } from '@baleybots/core';
const myTool = tool('lookup', 'Look up data', schema, async (params) => {
const data = await fetchData(params.id);
if (!data) return toolError('Not found', { retryable: false });
return toolResult(data);
});
Type Parameters
T
T
Properties
data
data:
T
Defined in: packages/core/src/utils/tool-result.ts:21
success
success:
true
Defined in: packages/core/src/utils/tool-result.ts:20