ScanQrCodeTool

class ScanQrCodeTool(context: Context) : McpTool

Decodes a QR code from a still image file (referenced by image_uri) using ML Kit barcode scanning restricted to Barcode.FORMAT_QR_CODE. This reads an existing image — it does NOT open the camera, so despite the module declaring CAMERA, no camera permission is needed for this tool. Returns the first QR code found, or found = false when none is present.

Result keys: raw_value, format (always "QR_CODE" when found), found.

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