Skip to main content
Glama

generate_qr

Generate a QR code from any text or URL, returning a base64-encoded image. Supports PNG and SVG formats with customizable colors.

Instructions

Generate a QR code and return it as a base64-encoded image.

Creates a QR code encoding any text or URL. Supports PNG (raster) and
SVG (vector, scales to any size). Custom foreground and background colours
allow brand-matched QR codes. Error correction level is M (~15% recovery).

Args:
    url: Content to encode — can be any URL, plain text, Wi-Fi credentials
         (WIFI:T:WPA;S:ssid;P:password;;), vCard, or other QR payload.
    size: Output image size in pixels (default 256, range 64–2048).
          Ignored for SVG format which is inherently resolution-independent.
    format: Output format — 'png' (default) or 'svg'.
    fg: Foreground (module) colour as hex (default '#000000').
    bg: Background colour as hex (default '#ffffff').
        Use '#00000000' for transparent background (PNG only).

Returns:
    Base64-encoded image string (PNG bytes or SVG text, base64-encoded).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bgNo#ffffff
fgNo#000000
urlYes
sizeNo
formatNopng

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description carries full burden. It discloses generation behavior, format differences, color support, error correction level, and size limitations. Transparent background note for PNG only is good. Could mention any rate limits or auth requirements, but none apparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a summary, details, and return info. It's somewhat lengthy but every sentence adds value. Could be slightly more concise, but clarity is prioritized.

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?

Given the simplicity of the tool (generate and return base64), the description covers all needed aspects: input parameters, format options, output description. No missing critical information.

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

Parameters5/5

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

Schema description coverage is 0%, but the description's Arg section thoroughly explains each parameter: url (content examples), size (default, range, SVG behavior), format (choices), fg and bg (hex defaults, transparent for PNG). This adds significant meaning beyond the bare schema.

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 it generates a QR code and returns it as a base64-encoded image. It specifies supported formats (PNG, SVG), customization options, and error correction level. No sibling tool does QR generation, so it's unique and distinguishable.

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 implies this tool is for creating QR codes from various payloads. While it doesn't explicitly state when not to use it, the uniqueness among siblings makes this less critical. A brief note on alternatives (if any) would improve it.

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/ForeverTools/kiprio-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server