Skip to main content
Glama

QR code generator

qr_code
Read-only

Encode text, URLs, payment links, Wi-Fi logins, or contact cards into QR codes and return SVG inline or as a data URI, with configurable error correction, colors, and quiet zone.

Instructions

Turn any text, URL, payment link, Wi-Fi login or contact card into a QR code. Returns an SVG (inline and as a data URI) plus, with include_matrix, the module matrix, with error-correction level L/M/Q/H, custom colors and quiet zone. Up to 2,000 bytes of data at levels L and M, 1,663 at Q, 1,273 at H. Costs $0.001 per call.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "data": "<data>"
    },
    "name": "qr_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
eccNoError correction: L 7%, M 15% (default), Q 25% (max 1,663 bytes), H 30% (max 1,273 bytes; use H if you'll overlay a logo).
darkNoForeground hex color, default "#000000".
dataYesWhat to encode, e.g. "https://aipaygen.com" or "WIFI:T:WPA;S:MyNet;P:secret;;".
lightNoBackground hex color, default "#ffffff".
borderNoQuiet-zone modules around the code (default 4; scanners need at least 2).
include_matrixNoAlso return the matrix as rows of 0/1 strings.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond readOnlyHint=true: it discloses the exact response shape (SVG inline plus data URI, matrix rows of 0/1 when include_matrix is set), documents capacity ceilings that vary by error-correction level, and states the per-call cost of $0.001. Pricing and output format are not derivable from annotations or schema, so this adds substantial decision-relevant context.

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 front-loaded sentences: what it encodes, what it returns, then the constraints (capacity, levels, colors, quiet zone) and cost. Every clause carries unique information — no restatement of the name or title, no filler.

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?

Although there is no output schema, the description fully specifies the return values (SVG plus data URI, optional matrix), the capacity limits that govern input size choices, and the invocation cost. For a single-required-parameter generation tool, nothing an agent needs in order to call it correctly is missing.

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 coverage is 100%, so the baseline is 3; the description earns an extra point by tying ECC levels to concrete byte ceilings (2,000 at L/M, 1,663 at Q, 1,273 at H) and to the logo-overlay use case, and by explaining what include_matrix actually produces rather than restating its boolean type. It still does not discuss dark/light/border interplay beyond naming them.

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?

Specific verb and resource — encode arbitrary content (text, URL, payment link, Wi-Fi string, vCard) into a QR code — plus an explicit statement of the return artifact (SVG inline and as data URI, optional module matrix). No sibling tool in the catalog does QR generation, so the agent can route unambiguously from the description alone.

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 opening lists concrete input categories that qualify (URL, payment link, Wi-Fi login, contact card), which tells the agent when this is the right tool, and the ECC note adds a conditional rule ('use H if you'll overlay a logo'). It stops short of explicit when-not-to-use guidance or naming alternatives, which is why it is a 4 rather than a 5.

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