ToolAnnotations

data class ToolAnnotations(val readOnlyHint: Boolean = false, val destructiveHint: Boolean = false, val idempotentHint: Boolean = false, val openWorldHint: Boolean = false, val title: String? = null)

Behavioural hints attached to a tool, mirroring the MCP tools/list annotation fields. They are advisory metadata for clients and LLMs — the SDK does not enforce them — but the HTTP transport's readOnly server mode uses readOnlyHint to decide which tools to expose.

Constructors

Link copied to clipboard
constructor(readOnlyHint: Boolean = false, destructiveHint: Boolean = false, idempotentHint: Boolean = false, openWorldHint: Boolean = false, title: String? = null)

Properties

Link copied to clipboard

The tool changes device or app state (click, type, send, install, force-stop, write a setting, …). Mutually exclusive in spirit with readOnlyHint.

Link copied to clipboard

Running the tool repeatedly with the same arguments leaves the device in the same final state (e.g. enable_app, put_secure_setting). Safe to retry.

Link copied to clipboard

The tool reaches beyond the local device (e.g. a network call). Not relevant for most droid-mcp tools, which touch only the local device.

Link copied to clipboard

The tool only observes device state; it never mutates anything. Read/query/get/list/find/wait tools set this. Required for a tool to survive readOnly = true server mode.

Link copied to clipboard

Optional human-friendly display name; falls back to McpTool.name when null.