Skip to main content
Glama
benswel

QR for Agent

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

TableJSON Schema
NameRequiredDescriptionDefault
phone_numberYesPhone number to call.
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 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 },
      });
    },
  • 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."),
    }),
  • 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 },
        });
      },
    },
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. It successfully discloses that the phone number is 'encoded directly' (indicating a static QR code), but fails to mention what the tool returns (image data, URL, or ID), error behaviors, 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?

Two sentences with zero waste: the first establishes core functionality, the second adds critical technical detail about encoding. Every word earns its place with no redundancy or generic filler.

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?

Given 12 parameters including extensive visual customization options (colors, frames, logo) and no output schema, the description is minimally viable. It covers the phone-call specific logic but omits any hint of the rich styling capabilities or return format, which would aid an agent in understanding the full scope of the tool.

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?

Input schema has 100% description coverage with detailed patterns and enums, so the baseline is appropriately met. The description mentions 'phone number' aligning with the required parameter, but adds no additional semantic context (e.g., format expectations, E.164 standard) beyond what the schema already provides.

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 specific action (create), resource (QR code), and unique function (initiates phone call when scanned). It effectively distinguishes this tool from siblings like create_sms_qr or create_vcard_qr by specifying the call-to-action behavior and direct phone number encoding.

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?

While the description implies usage through the specific 'phone call' functionality, it lacks explicit guidance on when to choose this over related tools (e.g., create_vcard_qr which can also contain phone numbers) or prerequisites like phone number formatting requirements.

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