ToolResult
data class ToolResult(val isSuccess: Boolean, val data: Map<String, Any?>?, val errorMessage: String?)
The outcome of an McpTool.execute call. Exactly one of data / errorMessage is meaningful, selected by isSuccess. The protocol layer maps a result onto the MCP tools/call response: success becomes content, failure becomes an isError: true payload.
Construct via the success / error factories rather than the primary constructor.
Constructors
Properties
Link copied to clipboard
Failure description on error; null on success. See the error overloads for the prose vs. short-form (code: detail) conventions.