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 or a custom frame spec, a border 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 and PNG 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 including custom frame specs, border templates, 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 quick logo icon
templateNoDecorative border template
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
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds real behavioral context beyond them: return artifacts (PNG image, public SVG/PNG URLs, vector EPS), the fact that logoFileId requires an API key and consequently removes the public image URL, and the include_svg payload size caveat. These are exactly the non-obvious side effects an agent needs. It doesn't discuss failure modes or rate limits, keeping it below a 5.

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 core verb and the styling capabilities, then usage and return behavior, then the design_qr exclusion. The middle enumeration is dense and list-like but each clause maps to actual capability; nothing is filler, though the single long sentence could be broken up for readability.

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?

With 19 parameters, a nested free-form style object, and no output schema, the description carries the right load: it explains what is returned (PNG plus SVG/PNG URLs and EPS), how to opt into SVG markup, and the one param that changes output availability (logoFileId). An agent has everything needed to call it correctly and to know when not to.

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 baseline is 3, but the description adds genuine meaning on top: precedence between style/item and the flat options, the intended round-trip from design_qr's qrdxStyle, the api-key requirement on logoFileId, and why include_svg is expensive. That is real semantic value rather than restatement of 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?

States a specific verb and resource ('Render a QR code') and immediately enumerates the styling axes it covers (colors/gradients, dot and eye shapes, frames, border templates, logos, community items). It explicitly distinguishes itself from design_qr via the 'no scan check' line, so an agent can route between the two siblings without opening a schema.

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

Usage Guidelines5/5

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

Gives concrete when-to-use guidance: pass design_qr's qrdxStyle as style to re-render at another size, and 'No scan check: use design_qr for that' explicitly excludes a competing capability. It also notes the precedence rule that flat options win over style/item, which is the main ambiguity for this tool.

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.