Companion

object Companion

Functions

Link copied to clipboard
fun error(message: String): ToolResult

A failed result with a human-readable message. Used by tools that predate 0.7.0.

fun error(code: String, detail: String?): ToolResult

Short-form error envelope: code or code: detail. Used by tools added in 0.7.0 so the harness can map machine-readable codes (accessibility_not_enabled, node_not_found, ...) without parsing prose. Wire shape is unchanged — errorMessage is still a single string.

Link copied to clipboard

A successful result carrying data. The map's keys are the tool's documented output shape.