Skip to main content
Glama

Generate QR code

generate_qr_code
Read-onlyIdempotent

Render a QR code with the editor's style options: colors or gradients (linear, radial), dot and eye shapes, eye and dot colors, a built-in frame with its text, a custom frame spec or a frame drawn as a template, a logo icon or your own uploaded logo (logoFileId, needs an API key), or a community item. Pass design_qr's qrdxStyle as style to render the same design again at another size. Returns a PNG image and public image URLs (SVG, PNG and lossless WebP for embedding in Markdown or HTML, plus a vector EPS for print); set include_svg to also get the SVG markup. No scan check: use design_qr for that.

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": "generate_qr_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
bgNoBackground color as hex (default ffffff)
fgNoForeground (module) color as hex (default 000000)
dotNoShape of the dot inside each corner eye (default square)
eyeNoShape of the corner eye frames (default square)
bodyNoShape of the data modules (default square)
dataYesText or URL to encode
itemNoA community theme or frame by id (search_community), such as frame:wifi-card; style and the flat options win over it
sizeNoWidth and height in pixels (64-2048)
frameNoA built-in call-to-action frame
levelNoError correction: L 7%, M 15%, Q 25% (default), H 30%
styleNoThe editor's whole style (the qrdxStyle design_qr returns, or a community item's style): gradients, frames (built-in, custom frame specs, or a template), eye and dot colors, logoIcon, logoFileId. The flat options above win over it.
marginNoQuiet zone around the code, in modules (default 4)
dotColorNoColor of the dot inside each corner eye (defaults to fg)
eyeColorNoColor of the three corner eyes (defaults to fg)
logoIconNoA logo QRdx draws: a quick icon on a white tile (wifi, location, phone, email, link, file, calendar, whatsapp, instagram), or any brand from Simple Icons by its slug (spotify, paypal, googlemaps), drawn in its brand color. Add :black or :white for those colors (whatsapp:white). Brand logos have no tile; set logoOptions.plate for a plate behind one.
templateNoA built-in frame drawn as a template (Arrow, StandardBox, SquareBorder, StrikedBox, Halloween, DotRing; default is none). Unlike `frame`, the whole artwork is `size` wide with the code smaller inside it
frameTextNoThe frame's label, up to 24 characters
logoFileIdNoYour own uploaded logo (PNG or JPEG, up to 1 MB) by file id; needs the workspace's API key on this connection. The code then has no public image URL.
include_svgNoAlso return the SVG markup as text, e.g. to save an .svg file. It is often 50-150 KB, so only request it when needed.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), and the description layers on non-obvious behavior: frameId requires the workspace API key, frame_text only takes effect alongside a frame, include_watermark adds a visible watermark, and template overrides frame. It also discloses the return envelope (PNG, public SVG/PNG/WebP/EPS URLs) and notes the SVG is only returned when requested.

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?

Front-loaded with the action and the return contract, with prerequisites (API key, frame pairing) appended where relevant. The middle sentence is a long comma-separated enumeration that reads as a feature dump rather than a decision aid, but no sentence is pure 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?

For a 19-parameter tool with nested objects and no output schema, the description still conveys the return shape, the size cap, the API-key prerequisite, the SVG opt-in, and the handoff to design_qr for scan validation — enough for an agent to call it correctly without opening anything else.

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% with enum values documented per field, so the baseline is 3; the description exceeds it by explaining cross-parameter precedence (flat options win over style, template wins over frame), the data-URL semantics of include_svg, and the 50-150 KB size warning. It stops short of clarifying every interplay, e.g. how style and item conflict when both are supplied.

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?

Opens with a specific verb and resource ("Render a QR code with the editor's style options") and enumerates the concrete capability surface — colors/gradients, dot and eye shapes, frames, logos, templates — so it is instantly distinguishable from design_qr and generate_barcode.

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?

Explicitly routes scanning/preview work to design_qr ("No scan preview — use design_qr for that") and names search_community as the source for community items. It gives clear conditions for alternatives but never states when-not to render at all or which cases require the style object versus flat options beyond a passing note.

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.