ToolDefinition class
Definition of a tool that the LLM can call.
Constructors
-
ToolDefinition({required String name, required String description, Map<
String, ToolParameter> parameters = const {}, List<String> required = const []}) -
const
Properties
- description → String
-
Human-readable description the LLM uses to decide when to call this tool.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
Unique name for this tool (e.g., "tap_element", "navigate_to_route").
final
-
parameters
→ Map<
String, ToolParameter> -
Parameter definitions keyed by parameter name.
final
-
required
→ List<
String> -
Which parameters are required.
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
-
toFunctionSchema(
) → Map< String, dynamic> - Convert to JSON Schema format used by LLM function calling APIs.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited