McpTool
The contract every droid-mcp tool implements. A tool is a single, self-describing capability — its name, description, and parameters are surfaced verbatim through MCP tools/list, and execute services a tools/call.
Tools are collected by a module's provider object (e.g. CalendarTools.all(context)) and registered into a ToolRegistry. They are invoked off the main thread (on Dispatchers.IO) and must degrade gracefully — when a required permission is missing or the device lacks a capability, return ToolResult.error rather than throwing.
The wire contract is the name, the parameters (names + types), and the keys of the map returned in ToolResult.data. These are frozen at 1.0; treat renames as breaking.
Properties
Behavioural hints for clients; defaults to all-false (ToolAnnotations with no hints set).
One-line, human- and LLM-readable summary of what the tool does. Surfaced in tools/list.
Optional JSON Schema (MCP 2025-06-18 outputSchema) describing the map returned in ToolResult.data, as nested maps/lists (e.g. mapOf("type" to "object", "properties" to …)). When set, clients may validate structuredContent against it, so it must match every successful result exactly. Null (the default) advertises no output schema.
Declared input parameters, rendered into the tool's JSON Schema inputSchema.