toPromptString method
Format for LLM consumption as a tool result message.
Implementation
String toPromptString() {
if (success) {
if (data.isEmpty) return 'Success.';
return 'Success: ${data.entries.map((e) => '${e.key}=${e.value}').join(', ')}';
}
return 'Error: ${error ?? "Unknown error"}';
}