ToolResultContent

data class ToolResultContent(val toolUseId: String, val content: List<ContentBlock> = emptyList(), val structuredContent: JsonObject? = null, val isError: Boolean? = null, val meta: JsonObject? = null) : SamplingMessageContent(source)

The result of a tool call previously requested via ToolUseContent, supplied back to the assistant on the next sampling turn.

Constructors

Link copied to clipboard
constructor(toolUseId: String, content: List<ContentBlock> = emptyList(), structuredContent: JsonObject? = null, isError: Boolean? = null, meta: JsonObject? = null)

Properties

Link copied to clipboard

The unstructured result, following the same shape as CallToolResult.content.

Link copied to clipboard

Whether the tool call ended in error. Defaults to absent (treated as false).

Link copied to clipboard
@SerialName(value = "_meta")
open override val meta: JsonObject?

property/parameter is reserved by MCP to allow clients and servers to attach additional metadata to their interactions.

Link copied to clipboard

Optional structured result; if the tool declared an output schema, this SHOULD conform to it.

Link copied to clipboard

The id of the ToolUseContent this result corresponds to.

Link copied to clipboard
open override val type: ContentTypes

discriminator identifying the content block subtype