Function
The input schema for the tool.
The output type of the tool.
The function to invoke when the tool is called.
An object containing the following properties:
The name of the tool.
The description of the tool. Defaults to either the description on the Zod schema, or ${fields.name} tool
.
The Zod schema defining the input for the tool. If undefined, it will default to a Zod string schema.
A new StructuredTool instance.
Function
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 input schema for the tool.
The output type of the tool.
The function to invoke when the tool is called.
An object containing the following properties:
The name of the tool.
The description of the tool. Defaults to either the description on the Zod schema, or ${fields.name} tool
.
The Zod schema defining the input for the tool. If undefined, it will default to a Zod string schema.
A new StructuredTool instance.
Function
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 input schema for the tool.
The output type of the tool.
The function to invoke when the tool is called.
An object containing the following properties:
The name of the tool.
The description of the tool. Defaults to either the description on the Zod schema, or ${fields.name} tool
.
The Zod schema defining the input for the tool. If undefined, it will default to a Zod string schema.
A new StructuredTool instance.
Function
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 input schema for the tool.
The output type of the tool.
The function to invoke when the tool is called.
An object containing the following properties:
The name of the tool.
The description of the tool. Defaults to either the description on the Zod schema, or ${fields.name} tool
.
The Zod schema defining the input for the tool. If undefined, it will default to a Zod string schema.
A new StructuredTool instance.
Function
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 input schema for the tool.
The output type of the tool.
The function to invoke when the tool is called.
An object containing the following properties:
The name of the tool.
The description of the tool. Defaults to either the description on the Zod schema, or ${fields.name} tool
.
The Zod schema defining the input for the tool. If undefined, it will default to a Zod string schema.
A new StructuredTool instance.
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.