Skip to main content
Glama
benswel

QR for Agent

create_app_store_qr

Generate a dynamic QR code that automatically redirects users to the appropriate app store based on their device type: App Store for iOS, Google Play for Android, or a fallback URL for other devices.

Instructions

Create a QR code that redirects to the correct app store based on the device. iPhones go to the App Store, Android devices go to Google Play, and other devices go to the fallback URL. Provide at least one store URL.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ios_urlNoApple App Store URL.
android_urlNoGoogle Play Store URL.
fallback_urlNoFallback URL for non-mobile devices.
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 definition, input schema, and handler for the create_app_store_qr tool. It uses apiRequest to call /api/qr.
    create_app_store_qr: {
      description:
        "Create a QR code that redirects to the correct app store based on the device. iPhones go to the App Store, Android devices go to Google Play, and other devices go to the fallback URL. Provide at least one store URL.",
      inputSchema: z.object({
        ios_url: z.string().optional().describe("Apple App Store URL."),
        android_url: z.string().optional().describe("Google Play Store URL."),
        fallback_url: z.string().optional().describe("Fallback URL for non-mobile devices."),
        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 { ios_url, android_url, fallback_url, ...rest } = input;
        return apiRequest("/api/qr", {
          method: "POST",
          body: { type: "app_store", app_store_data: { ios_url, android_url, fallback_url }, ...rest },
        });
      },
    },
Behavior4/5

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

No annotations provided, so description carries full burden. Effectively discloses the core behavioral trait: device detection routing (iPhone→App Store, Android→Google Play, other→fallback). Missing: persistence details, rate limits, or error behavior when invalid URLs provided.

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?

Three tightly constructed sentences with zero waste: purpose statement, routing logic breakdown, and input constraint. Information is front-loaded with the creation action immediately stated.

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?

With 14 parameters including extensive styling options (colors, frames, logo) and no output schema, description covers the unique app-store logic well but omits mention of visual customization capabilities and what the tool returns (QR code data, URL, or file reference).

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

Parameters4/5

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

Schema has 100% coverage (baseline 3). Description adds critical constraint not in schema: 'Provide at least one store URL' (parameters are technically optional in schema but semantically required). Also clarifies relationship between ios_url, android_url, and fallback_url through the device routing explanation.

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?

Clear specific verb ('Create') + resource ('QR code') + distinctive behavior ('redirects to the correct app store based on the device'). The device-routing logic clearly distinguishes this from generic create_qr_code and specialized siblings like create_email_qr or create_wifi_qr.

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?

Implies usage context through device-routing description (use when you have app store links), but lacks explicit 'when to use vs alternatives' guidance. No mention of sibling update_app_store_qr or when to prefer this over bulk_create_qr_codes.

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