Complete reference for the Tool class
Tool
class provides a type-safe way to create tools that agents can use.
name
(required): Unique identifier for the tooldescription
(required): Clear description of what the tool doesversion
: Semantic version numberinputSchema
: Schema for input validation (Zod schema or JSON Schema)execute
(required): Function that performs the tool’s operationvalidate
: Custom validation function