Function: toolSuccess()
Makaio Framework / tools-core / toolSuccess
Function: toolSuccess()
Section titled “Function: toolSuccess()”toolSuccess<
T>(data):ToolSuccess<T>
Defined in: ../../../tools/core/src/errors.ts:107
Creates a successful ToolResult with data.
Type Parameters
Section titled “Type Parameters”T
Type of the success data
Parameters
Section titled “Parameters”T
Success data to wrap
Returns
Section titled “Returns”ToolSuccess<T>
Successful ToolResult with data
Example
Section titled “Example”const content = await fs.readFile(path, 'utf-8');return toolSuccess({ content });