Skip to main content
Glama

generate_qr_code

Encode text or URLs into QR code images in PNG, SVG, or GIF format. Customize size, colors, and error correction level.

Instructions

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

Use this when you need to encode a URL, text, or other data into a QR code
image that can be displayed or embedded in documents/web pages.

Parameters:
    text    — The text or URL to encode in the QR code (required).
    format  — Output image format: "png", "svg", or "gif" (default: "png").
    size    — Image size in pixels (100-1000, default: 300).
    color   — Foreground hex color (without #, default: "000000").
    bgcolor — Background hex color (without #, default: "FFFFFF").
    ecc     — Error correction level: "L", "M", "Q", or "H" (default: "M").
              Higher levels allow more damage before the code becomes unreadable.
    margin  — Margin in modules (0-20, default: 4).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes
formatNopng
sizeNo
colorNo000000
bgcolorNoFFFFFF
eccNoM
marginNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It describes the output as Base64-encoded data and explains default parameter values. However, it does not explicitly state that the tool is read-only or has no side effects, nor does it mention any prerequisites or limitations beyond parameter ranges.

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 clear summary, usage note, and parameter list. It is appropriately sized with no superfluous text, though the parameter list could be condensed slightly without loss of clarity.

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 tool has 7 parameters and an output schema exists, the description adequately covers input details and mentions the return format (Base64-encoded data). It does not need to explain the output schema further since that is provided separately.

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%, so the description must fully explain parameters. It does so comprehensively: for each of the 7 parameters, it provides the data type, default value, allowed values or ranges, and a brief explanation (e.g., 'ECC – Higher levels allow more damage before the code becomes unreadable'). This adds significant meaning beyond the 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 'Generate a QR code image and return it as Base64-encoded data', providing a specific verb (generate) and resource (QR code image). This clearly distinguishes it from all sibling tools, none of which generate QR codes.

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 explicitly says 'Use this when you need to encode a URL, text, or other data into a QR code image that can be displayed or embedded in documents/web pages.' This gives clear context for when to use the tool, though it does not explicitly mention when not to use it or provide alternatives.

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/scotia1973-bot/api-hub'

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