tool<
SchemaT extends ZodStringV3,
ToolOutputT = any,
FuncT extends RunnableFunc<InferInteropZodOutput| Name | Type | Description |
|---|---|---|
func* | FuncT | |
fields* | ToolWrapperParams<SchemaT> |
Creates a new StructuredTool instance with the provided function, name, description, and schema.
Schema can be provided as Zod or JSON schema, and both will be validated.
The function to invoke when the tool is called.
An object containing the following properties: