Package-level declarations

Types

Link copied to clipboard

Generates a QR code image from arbitrary text using ZXing's QRCodeWriter, rendered to a square PNG (size px, clamped 100–1000, default 300) and returned base64-encoded. No permissions required; no camera or hardware involved.

Link copied to clipboard
object QrTools

Provider for the QR/barcode module: ScanQrCodeTool, ScanBarcodeTool, and GenerateQrCodeTool.

Link copied to clipboard
class ScanBarcodeTool(context: Context) : McpTool

Decodes a 1D/product barcode from a still image file (referenced by image_uri) using ML Kit, restricted to EAN-13, UPC-A, CODE-128, CODE-39, EAN-8, and UPC-E. Reads an existing image — does NOT open the camera, so no camera permission is needed despite the module declaring CAMERA. Returns the first barcode found, or found = false when none is present.

Link copied to clipboard
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.