toToolMap method
Implementation
Map<String, Object?> toToolMap() {
final map = <String, Object?>{
'rule': rule,
'message': message,
'path': List<String>.unmodifiable(path ?? const <String>[]),
};
if (details != null && details!.isNotEmpty) {
map['details'] = _normalizeMap(details!);
}
return map;
}