Tool class

Represents a tool that can be called by an agent to perform a specific function.

Tools are the primary way for agents to interact with external systems, execute specific operations, or access particular capabilities.

Constructors

Tool.new({required String name, required ToolCallHandler onCall, String? description, JsonSchema? inputSchema})
Creates a new tool with the specified properties.

Properties

description String?
Human-readable description of what the tool does.
final
hashCode int
The hash code for this object.
no setterinherited
inputSchema → JsonSchema?
Schema definition for the expected input parameters.
final
name String
The unique identifier for this tool.
final
onCall ToolCallHandler
The function that will be executed when this tool is called.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited