create_vcard_qr
Generate QR codes that encode contact cards for easy sharing. When scanned, the QR code prompts users to save contact information directly to their phone address book.
Instructions
Create a QR code that encodes a contact card (vCard). When scanned by a phone camera, it prompts the user to save the contact. Supports all standard vCard fields and custom QR styling.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| first_name | Yes | Contact first name. | |
| last_name | Yes | Contact last name. | |
| organization | No | Company or organization. | |
| title | No | Job title. | |
| No | Email address. | ||
| phone | No | Phone number. | |
| url | No | Website URL. | |
| address | No | Street address. | |
| note | No | Additional notes. | |
| 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:301-311 (handler)The handler function that formats the vCard data and makes the API request to create the QR code.
handler: async (input: Record<string, unknown>) => { const { first_name, last_name, organization, title, email, phone, url, address, note, ...rest } = input; return apiRequest("/api/qr", { method: "POST", body: { type: "vcard", vcard_data: { first_name, last_name, organization, title, email, phone, url, address, note }, ...rest, }, }); }, - packages/mcp/src/tools.ts:279-300 (schema)The input schema definition for the create_vcard_qr tool.
inputSchema: z.object({ first_name: z.string().describe("Contact first name."), last_name: z.string().describe("Contact last name."), organization: z.string().optional().describe("Company or organization."), title: z.string().optional().describe("Job title."), email: z.string().optional().describe("Email address."), phone: z.string().optional().describe("Phone number."), url: z.string().optional().describe("Website URL."), address: z.string().optional().describe("Street address."), note: z.string().optional().describe("Additional notes."), 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:276-312 (registration)Tool definition registration for create_vcard_qr.
create_vcard_qr: { description: "Create a QR code that encodes a contact card (vCard). When scanned by a phone camera, it prompts the user to save the contact. Supports all standard vCard fields and custom QR styling.", inputSchema: z.object({ first_name: z.string().describe("Contact first name."), last_name: z.string().describe("Contact last name."), organization: z.string().optional().describe("Company or organization."), title: z.string().optional().describe("Job title."), email: z.string().optional().describe("Email address."), phone: z.string().optional().describe("Phone number."), url: z.string().optional().describe("Website URL."), address: z.string().optional().describe("Street address."), note: z.string().optional().describe("Additional notes."), 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 { first_name, last_name, organization, title, email, phone, url, address, note, ...rest } = input; return apiRequest("/api/qr", { method: "POST", body: { type: "vcard", vcard_data: { first_name, last_name, organization, title, email, phone, url, address, note }, ...rest, }, }); }, },