Skip to main content
Glama
benswel

QR for Agent

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

TableJSON Schema
NameRequiredDescriptionDefault
summaryYesEvent title/summary.
startYesEvent start date-time in ISO 8601 format (e.g. 2026-03-15T09:00:00Z).
endYesEvent end date-time in ISO 8601 format.
locationNoEvent location.
descriptionNoEvent description.
labelNoLabel for this QR code.
formatNoImage format.svg
foreground_colorNoHex color for dots.
background_colorNoHex color for background.
dot_styleNoDot shape.
corner_styleNoCorner shape.
logo_urlNoLogo URL or data URI.
frame_styleNoFrame style around QR.
frame_textNoCTA text on frame (max 30 chars).
frame_colorNoFrame background color.
frame_text_colorNoFrame text color.

Implementation Reference

  • 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 },
      });
    },
  • 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."),
    }),
  • 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 },
        });
      },
    },
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must fully disclose behavior. It mentions that the QR encodes an iCalendar VEVENT, which is helpful, but it does not describe what the tool returns (e.g., image URL, file), whether the QR is stored server-side, any authentication needs, rate limits, or side effects. The behavioral transparency is insufficient for a complex tool with many parameters.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences long, front-loads the core purpose, and contains no filler words. Every sentence contributes meaningful information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite having 16 parameters and no output schema, the description is minimal. It does not explain the workflow (e.g., how the QR code is delivered), any limitations (e.g., text encoding limits), or error conditions. For a tool with this complexity, the description is insufficiently complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% coverage with descriptions for all 16 parameters, so the baseline is 3. The description adds context about the iCalendar format, but it does not explain parameter relationships or provide additional constraints beyond what the schema already offers. Overall, the description adds marginal value to the parameter semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool creates a QR code that adds a calendar event when scanned, and specifies that it encodes a standard iCalendar VEVENT. This clearly distinguishes it from sibling QR creation tools (e.g., create_email_qr, create_vcard_qr) by focusing on calendar events.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies the tool is for creating calendar event QR codes, but it does not explicitly state when to use it versus alternatives (e.g., for other QR types). There is no mention of when not to use it or any prerequisites, leaving the agent to infer from the tool name and context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/benswel/qr-agent-core'

If you have feedback or need assistance with the MCP directory API, please join our Discord server