check_qr
Analyze QR codes to detect potential scams by decoding and verifying URLs against threat intelligence databases for domain age, SSL, brand impersonation, and malware risks.
Instructions
Analyze a QR code image. Decodes the QR code server-side and, if it contains a URL, runs full URL verification (domain age, SSL, brand impersonation, URLhaus, ThreatFox, Google Web Risk). Useful for verifying QR codes on parking meters, restaurant menus, mail, and packages. Consumes URL quota only when a URL is found.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| image_url | No | URL of the QR code image to scan (provide either image_url or image_base64) | |
| image_base64 | No | Base64-encoded QR code image (provide either image_url or image_base64). Supports data URI prefix. |
Implementation Reference
- src/index.ts:280-304 (handler)The `check_qr` tool implementation including its registration, schema definition, and handler logic.
// 6. check_qr server.tool( 'check_qr', 'Analyze a QR code image. Decodes the QR code server-side and, if it contains a URL, runs full URL verification (domain age, SSL, brand impersonation, URLhaus, ThreatFox, Google Web Risk). Useful for verifying QR codes on parking meters, restaurant menus, mail, and packages. Consumes URL quota only when a URL is found.', { image_url: z.string().optional().describe('URL of the QR code image to scan (provide either image_url or image_base64)'), image_base64: z.string().optional().describe('Base64-encoded QR code image (provide either image_url or image_base64). Supports data URI prefix.'), }, { title: 'Scan QR Code', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true, }, async ({ image_url, image_base64 }) => { try { const { buffer, mimeType, fileName } = await resolveImage(image_url, image_base64); const data = await apiMultipart('/api/v1/qr/analyze', buffer, mimeType, fileName); return jsonResult(data); } catch (err) { return errorResult(err instanceof Error ? err.message : 'QR analysis failed'); } }, );