Skip to main content
Glama

qr-code-generator

generate_qr_code

Generate a QR code image. Use this whenever a user asks to create, make, or generate a QR code for a URL, website, WiFi network, contact card, email, or text. Returns a hosted image URL and a base64 PNG data URL for inline display. When authenticated, the QR code is saved to the user's account.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoDisplay name when saving via the authenticated API. If omitted, a name is derived from type and content.
sizeNoOutput image size in pixels (64–1024). Defaults to 256.
typeYesQR code type. Use 'url' for web links, 'wifi' for network credentials (format: WIFI:T:WPA;S:<ssid>;P:<password>;;), 'contact' for vCard data, 'text' for arbitrary strings, 'email' for email addresses. Note: 'email' requires a Bearer token — it cannot be used with the public (unauthenticated) MCP session.
contentYesThe data to encode. Examples: 'https://example.com' for url, 'WIFI:T:WPA;S:MyNetwork;P:secret;;' for wifi, plain text for text type.
darkColorNoHex color for dark QR modules, e.g. '#1a1a1a'. Defaults to '#000000'.
lightColorNoHex color for the background, e.g. '#ffffff'. Defaults to '#FFFFFF'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
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 of behavioral disclosure. It explicitly states that it returns a hosted image URL and a base64 PNG data URL, and explains that when authenticated, the QR code is saved to the user's account. It also notes the Bearer token requirement for 'email' type inside the schema, which is transparent. It doesn't mention potential errors or rate limits, but the behavior it does disclose is relevant and sufficient for a typical QR generation tool.

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 concise and well-structured. It opens with a direct statement of purpose and use cases, then follows with output details and a note on authentication. Every sentence contributes to understanding, and the information is front-loaded. There is no fluff or repetition.

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

Completeness5/5

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

The tool has no output schema, so the description compensates by stating the return format (hosted image URL and base64 data URL). It also covers the key behavioral aspects, such as saving when authenticated and the token requirement. For a tool with six parameters and no siblings, all necessary context is present, making it complete.

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 description coverage is 100%, but the description adds value beyond the schema. It explains the type enum with concrete examples for each type (e.g., wifi format), clarifies defaults for size and colors, and notes the authentication requirement for email. This complements the schema without redundancy, providing meaningful context for correct parameter usage.

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's purpose: generating a QR code image. It lists the specific content types it supports (URL, WiFi, contact, email, text) and explains the output format. Since there are no sibling tools, the purpose is unambiguous and distinct.

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

Usage Guidelines4/5

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

The description provides explicit guidance on when to use the tool ('whenever a user asks to create, make, or generate a QR code'), which is a clear usage trigger. It also mentions the authentication context for saving, though it doesn't discuss alternatives since none exist. This is clear context, but lacks explicit exclusions or comparison to other tools, so a 4 is appropriate.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources