AIClientTool

interface AIClientTool

A tool this device runs when an AI agent asks for it.

The agent writes the call on its reply as an ai_tool_call step with executor: client and status: awaiting_client, addressed to one person and one install. An AIClientToolRunner on that install runs it and sends the result back.

Properties

Link copied to clipboard

The tool's name, description, argument schema and read-only hint, as the agent sees them. Made from AIClientTool.name, AIClientTool.description, AIClientTool.inputSchema and AIClientTool.isReadOnly, so it always agrees with them.

Link copied to clipboard

What the tool does, for the agent. Empty by default.

Link copied to clipboard
open val inputSchema: Map<String, Any?>?

The JSON Schema of the tool's arguments, as plain Kotlin values, or null when it describes none. null by default.

Link copied to clipboard

Whether the tool only reads and changes nothing. A reply's UI runs only such a tool by itself, such as to load data while it shows; any other runs only when the person asks for it. false by default.

Link copied to clipboard
abstract val name: String

The tool's name, as the agent declared it.

Functions

Link copied to clipboard
abstract suspend fun run(call: AIToolCallPart): AIClientToolResult

Runs one call.