API
interface ToolOptionsWithUnknownSchema<Name extends string, Result> {deps: DependencyList ;description: string;handler: (input: any, abortSignal: AbortSignal ) =>
Promise <Result>;name: Name;schema: object;}ToolOptionsWithUnknownSchema
@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
(input: any, abortSignal: AbortSignal) => Promise<Result>The handler of the tool. This is what the LLM agent will call to execute the tool, passing in an input that adheres to the schema.
name
NameThe name of the tool.
schema
objectThe unknown schema that describes the input for the tool.