create_phone_qr
Generate QR codes that initiate phone calls when scanned. Customize appearance with colors, styles, and optional branding elements.
Instructions
Create a QR code that initiates a phone call when scanned. The phone number is encoded directly in the QR code.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| phone_number | Yes | Phone number to call. | |
| 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:464-470 (handler)The handler for the create_phone_qr tool which sends a POST request to /api/qr with type set to 'phone'.
handler: async (input: Record<string, unknown>) => { const { phone_number, ...rest } = input; return apiRequest("/api/qr", { method: "POST", body: { type: "phone", phone_data: { phone_number }, ...rest }, }); }, - packages/mcp/src/tools.ts:450-463 (schema)The input schema for the create_phone_qr tool, defining the required and optional parameters.
inputSchema: z.object({ phone_number: z.string().describe("Phone number to call."), 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."), }), - packages/mcp/src/tools.ts:447-471 (registration)The full definition and registration of the create_phone_qr tool within the MCP tools object.
create_phone_qr: { description: "Create a QR code that initiates a phone call when scanned. The phone number is encoded directly in the QR code.", inputSchema: z.object({ phone_number: z.string().describe("Phone number to call."), 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 { phone_number, ...rest } = input; return apiRequest("/api/qr", { method: "POST", body: { type: "phone", phone_data: { phone_number }, ...rest }, }); }, },