Generate QR code
generate_qr_codeRender 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
| Name | Required | Description | Default |
|---|---|---|---|
| bg | No | Background color as hex (default ffffff) | |
| fg | No | Foreground (module) color as hex (default 000000) | |
| dot | No | Shape of the dot inside each corner eye (default square) | |
| eye | No | Shape of the corner eye frames (default square) | |
| body | No | Shape of the data modules (default square) | |
| data | Yes | Text or URL to encode | |
| item | No | A community theme or frame by id (search_community), such as frame:wifi-card; style and the flat options win over it | |
| size | No | Width and height in pixels (64-2048) | |
| frame | No | A built-in call-to-action frame | |
| level | No | Error correction: L 7%, M 15%, Q 25% (default), H 30% | |
| style | No | The 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. | |
| margin | No | Quiet zone around the code, in modules (default 4) | |
| dotColor | No | Color of the dot inside each corner eye (defaults to fg) | |
| eyeColor | No | Color of the three corner eyes (defaults to fg) | |
| logoIcon | No | A quick logo icon | |
| template | No | Decorative border template | |
| frameText | No | The frame's label, up to 24 characters | |
| logoFileId | No | Your 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_svg | No | Also 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. |