Skip to content

Function: toolSuccess()

Makaio Framework


Makaio Framework / tools-core / toolSuccess

toolSuccess<T>(data): ToolSuccess<T>

Defined in: ../../../tools/core/src/errors.ts:107

Creates a successful ToolResult with data.

T

Type of the success data

T

Success data to wrap

ToolSuccess<T>

Successful ToolResult with data

const content = await fs.readFile(path, 'utf-8');
return toolSuccess({ content });