Skip to main content
Glama
benswel

QR for Agent

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

TableJSON Schema
NameRequiredDescriptionDefault
first_nameYesContact first name.
last_nameYesContact last name.
organizationNoCompany or organization.
titleNoJob title.
emailNoEmail address.
phoneNoPhone number.
urlNoWebsite URL.
addressNoStreet address.
noteNoAdditional notes.
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 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,
        },
      });
    },
  • 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."),
    }),
  • 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,
          },
        });
      },
    },
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively explains the scanning behavior ('prompts the user to save the contact'), but omits critical behavioral details such as what the tool returns (image data vs URL), whether the QR code is persisted server-side, and any rate limiting or idempotency characteristics.

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 consists of two efficient sentences with zero waste. It is properly front-loaded with the core purpose (vCard QR creation) in the first sentence, followed by capability scope in the second. Every word earns its place.

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

Completeness3/5

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

For a tool with 20 parameters and no output schema or annotations, the description is minimally adequate. It covers the functional purpose and user experience but fails to describe the return value or output format, which would be essential information given the absence of an output schema.

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?

Schema description coverage is 100%, establishing a baseline of 3. The description adds conceptual grouping by mentioning 'standard vCard fields and custom QR styling,' which helps agents understand the two functional categories of the 20 parameters. However, it does not elaborate on parameter interactions, required fields (first_name, last_name), or detailed usage beyond the schema's own descriptions.

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 explicitly states the specific action (Create), output format (QR code), and content type (vCard/contact card). Given the numerous sibling QR creation tools (create_email_qr, create_wifi_qr, etc.), specifying 'encodes a contact card' effectively distinguishes this tool's specific purpose from alternatives.

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 explains the end-user outcome ('prompts the user to save the contact'), implying usage for contact sharing scenarios. However, it lacks explicit when-to-use guidance or comparisons against siblings like create_text_qr (which could also encode contact info as text), leaving usage implicit rather than prescribed.

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