McpToolResult

data class McpToolResult(val content: List<McpContent>, val structuredContent: JsonElement? = null, val isError: Boolean = false, val raw: JsonObject? = null)(source)

The result of tools/call. isError results are tool failures the model should see.

Constructors

Link copied to clipboard
constructor(content: List<McpContent>, structuredContent: JsonElement? = null, isError: Boolean = false, raw: JsonObject? = null)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val raw: JsonObject?

The CallToolResult as the server sent it (e.g. for an MCP App's ui/notifications/tool-result).

Link copied to clipboard
val structuredContent: JsonElement?

Functions

Link copied to clipboard
fun toText(): String

The result as text for a model: text items verbatim, embedded text resources inline, other media described. Falls back to the structured content's JSON.