textOf function

String textOf(
  1. CallToolResult result
)

Concatenates the text content of a tool result.

Implementation

String textOf(CallToolResult result) => result.content
    .map((c) => c is TextContent ? c.text : c.toString())
    .join('\n');