create_event_qr
Encode a calendar event into a QR code that, when scanned, adds the event to a device's calendar. Configure event title, start/end times, location, description, and customize the QR appearance with colors, dot styles, logo, and frame.
Instructions
Create a QR code that adds a calendar event when scanned. Encodes a standard iCalendar VEVENT that calendar apps can import.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| summary | Yes | Event title/summary. | |
| start | Yes | Event start date-time in ISO 8601 format (e.g. 2026-03-15T09:00:00Z). | |
| end | Yes | Event end date-time in ISO 8601 format. | |
| location | No | Event location. | |
| description | No | Event description. | |
| 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:494-500 (handler)The handler function for create_event_qr. It destructures the event-specific fields (summary, start, end, location, description) and sends them to the /api/qr endpoint as an event type QR code.
handler: async (input: Record<string, unknown>) => { const { summary, start, end, location, description, ...rest } = input; return apiRequest("/api/qr", { method: "POST", body: { type: "event", event_data: { summary, start, end, location, description }, ...rest }, }); }, - packages/mcp/src/tools.ts:476-493 (schema)The input validation schema for create_event_qr using Zod. Requires summary, start, end (ISO 8601 strings), with optional location, description, label, format, colors, dot/corner/frame styles, logo, and frame text.
inputSchema: z.object({ summary: z.string().describe("Event title/summary."), start: z.string().describe("Event start date-time in ISO 8601 format (e.g. 2026-03-15T09:00:00Z)."), end: z.string().describe("Event end date-time in ISO 8601 format."), location: z.string().optional().describe("Event location."), description: z.string().optional().describe("Event description."), 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:473-501 (registration)Registration of create_event_qr as a tool definition in the tools object, which is then iterated over in server.ts to register each tool with the MCP server.
create_event_qr: { description: "Create a QR code that adds a calendar event when scanned. Encodes a standard iCalendar VEVENT that calendar apps can import.", inputSchema: z.object({ summary: z.string().describe("Event title/summary."), start: z.string().describe("Event start date-time in ISO 8601 format (e.g. 2026-03-15T09:00:00Z)."), end: z.string().describe("Event end date-time in ISO 8601 format."), location: z.string().optional().describe("Event location."), description: z.string().optional().describe("Event description."), 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 { summary, start, end, location, description, ...rest } = input; return apiRequest("/api/qr", { method: "POST", body: { type: "event", event_data: { summary, start, end, location, description }, ...rest }, }); }, },