API
interface ToolOptionsWithoutInput<Name extends string, Result> {deps: DependencyList ;description: string;handler: (abortSignal: AbortSignal ) =>
Promise <Result>;name: Name;}ToolOptionsWithoutInput
@typeNamestring@typeResultdeps
DependencyListDependencies that should trigger tool recreation. The hook will automatically memoize the handler based on these dependencies, so you can safely pass anonymous functions.
description
stringThe description of the tool. This helps the LLM understand its purpose.
handler
(abortSignal: AbortSignal) => Promise<Result>The handler of the tool. This is what the LLM agent will call to execute the tool.
name
NameThe name of the tool.