create_app_store_qr
Generate a dynamic QR code that automatically redirects users to the appropriate app store based on their device type: App Store for iOS, Google Play for Android, or a fallback URL for other devices.
Instructions
Create a QR code that redirects to the correct app store based on the device. iPhones go to the App Store, Android devices go to Google Play, and other devices go to the fallback URL. Provide at least one store URL.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ios_url | No | Apple App Store URL. | |
| android_url | No | Google Play Store URL. | |
| fallback_url | No | Fallback URL for non-mobile devices. | |
| label | No | Label for this QR code. | |
| format | No | Image format. | svg |
| foreground_color | No | Hex color for dots. | |
| background_color | No | Hex color for background. | |
| dot_style | No | Dot shape. | |
| corner_style | No | Corner shape. | |
| logo_url | No | Logo URL or data URI. | |
| frame_style | No | Frame style around QR. | |
| frame_text | No | CTA text on frame (max 30 chars). | |
| frame_color | No | Frame background color. | |
| frame_text_color | No | Frame text color. |
Implementation Reference
- packages/mcp/src/tools.ts:590-616 (handler)The definition, input schema, and handler for the create_app_store_qr tool. It uses apiRequest to call /api/qr.
create_app_store_qr: { description: "Create a QR code that redirects to the correct app store based on the device. iPhones go to the App Store, Android devices go to Google Play, and other devices go to the fallback URL. Provide at least one store URL.", inputSchema: z.object({ ios_url: z.string().optional().describe("Apple App Store URL."), android_url: z.string().optional().describe("Google Play Store URL."), fallback_url: z.string().optional().describe("Fallback URL for non-mobile devices."), label: z.string().optional().describe("Label for this QR code."), format: z.enum(["svg", "png"]).default("svg").describe("Image format."), foreground_color: z.string().regex(/^#[0-9A-Fa-f]{6}$/).optional().describe("Hex color for dots."), background_color: z.string().regex(/^#[0-9A-Fa-f]{6}$/).optional().describe("Hex color for background."), dot_style: z.enum(["square", "rounded", "dots", "classy-rounded"]).optional().describe("Dot shape."), corner_style: z.enum(["square", "extra-rounded", "dot"]).optional().describe("Corner shape."), logo_url: z.string().optional().describe("Logo URL or data URI."), frame_style: z.enum(["none", "banner_bottom", "banner_top", "rounded"]).optional().describe("Frame style around QR."), frame_text: z.string().max(30).optional().describe("CTA text on frame (max 30 chars)."), frame_color: z.string().regex(/^#[0-9A-Fa-f]{6}$/).optional().describe("Frame background color."), frame_text_color: z.string().regex(/^#[0-9A-Fa-f]{6}$/).optional().describe("Frame text color."), }), handler: async (input: Record<string, unknown>) => { const { ios_url, android_url, fallback_url, ...rest } = input; return apiRequest("/api/qr", { method: "POST", body: { type: "app_store", app_store_data: { ios_url, android_url, fallback_url }, ...rest }, }); }, },