@tool decorator to mark a method as a tool with a description and schema. Supports both explicit ZodSchema and class-based schema derivation.
@tool
Usage with ZodSchema: @tool("Description", z.object({ ... }))
Usage with class-based schema: @tool("Description") async method(params: ClassBasedParams): Promise { ... }
Description of the tool's functionality.
Optional
Optional Zod schema or class constructor.
A method decorator function.
@tool
decorator to mark a method as a tool with a description and schema. Supports both explicit ZodSchema and class-based schema derivation.Usage with ZodSchema: @tool("Description", z.object({ ... }))
Usage with class-based schema: @tool("Description") async method(params: ClassBasedParams): Promise { ... }