Skip to main content
Glama
benswel

QR for Agent

create_wifi_qr

Generate QR codes for WiFi networks to allow phones to connect automatically when scanned. Encodes network credentials directly in the image for offline access.

Instructions

Create a QR code that encodes WiFi credentials. When scanned by a phone camera, it offers to auto-join the WiFi network. No internet connection needed to join — the credentials are encoded directly in the QR image.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ssidYesWiFi network name (SSID).
passwordNoWiFi password. Omit for open networks (use encryption='nopass').
encryptionNoEncryption type. Default: WPA.WPA
hiddenNoWhether the network is hidden. Default: false.
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

  • Handler function for the create_wifi_qr tool that calls the API.
    handler: async (input: Record<string, unknown>) => {
      const { ssid, password, encryption, hidden, ...rest } = input;
      return apiRequest("/api/qr", {
        method: "POST",
        body: {
          type: "wifi",
          wifi_data: { ssid, password, encryption, hidden },
          ...rest,
        },
      });
    },
  • Input schema definition for the create_wifi_qr tool.
    inputSchema: z.object({
      ssid: z.string().describe("WiFi network name (SSID)."),
      password: z.string().optional().describe("WiFi password. Omit for open networks (use encryption='nopass')."),
      encryption: z.enum(["WPA", "WEP", "nopass"]).default("WPA").describe("Encryption type. Default: WPA."),
      hidden: z.boolean().optional().describe("Whether the network is hidden. Default: false."),
      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."),
    }),
Behavior4/5

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

With no annotations provided, the description carries the full burden and successfully discloses key behavioral traits: the auto-join mechanism when scanned and the offline capability (credentials encoded directly). It appropriately clarifies that this is not a web-redirect QR but a native WiFi configuration format.

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 no redundancy. Front-loaded with the core action, followed by user experience (scanning behavior), and ending with technical implementation (offline encoding). Every sentence provides distinct value.

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

Completeness4/5

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

Given the 15 parameters with complete schema documentation and no output schema, the description adequately covers the domain-specific functionality (WiFi encoding) without needing to enumerate self-explanatory styling options. Minor gap: does not describe the return value format (e.g., image data URI or file path).

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 semantic grouping by referring to 'WiFi credentials' (encompassing ssid and password) and explaining the encoding mechanism, but does not elaborate on parameter relationships like the password/encryption dependency or styling parameter interactions.

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 a QR code) and resource type (WiFi credentials), distinguishing it from generic create_qr_code and other specialized siblings like create_email_qr or create_vcard_qr. The specificity of 'WiFi credentials' and 'auto-join' functionality makes the scope unambiguous.

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 provides valuable behavioral context (offline capability, auto-join behavior) that helps infer when to use this tool, but lacks explicit guidance on when to choose this over the generic create_qr_code or how to handle error cases like invalid SSID formats.

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