LabelImageTool

class LabelImageTool(context: Context) : McpTool

Classifies the contents of a local image with on-device ML Kit image labeling, returning labels above min_confidence (clamped 0.0–1.0, default 0.5).

No permissions required; image_path is sandboxed to the external-storage root via PathValidator and must point at an existing file. Read-only.

Output keys: label_count, labels (each with text, confidence, index).

Constructors

Link copied to clipboard
constructor(context: Context)

Properties

Link copied to clipboard
open override val annotations: ToolAnnotations
Link copied to clipboard
open override val description: String
Link copied to clipboard
open override val name: String
Link copied to clipboard
open override val parameters: List<ToolParameter>

Functions

Link copied to clipboard
open suspend override fun execute(params: Map<String, Any>): ToolResult