toolkit-mcp-server: generate QR code
toolkit_generate_qrEncode text or URLs into QR codes in SVG, PNG base64, or terminal format with configurable error correction.
Instructions
Encode text or a URL into a QR code. data is the content to encode (a link, a generated identifier such as toolkit_generate_id's ids[0], or any string). format selects the output: svg returns inline SVG markup, png_base64 returns base64-encoded PNG bytes (with mimeType and byteLength), and terminal returns a block of Unicode block characters renderable in a monospace terminal. errorCorrection (L/M/Q/H) trades data capacity for damage tolerance, margin sets the quiet-zone width, and scale sets pixels per module for raster output. The returned version (1–40) reflects how dense the encoded data is.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | The text or URL to encode. 2953 is the absolute ceiling (QR version 40, level L, byte mode); usable capacity drops at higher errorCorrection levels, so over-capacity data is rejected with a typed data_too_large error rather than a generic failure. | |
| scale | No | Pixels per module for raster (png_base64) output. Ignored for terminal. | |
| format | No | Output format: svg markup, png_base64 (raster bytes), or a terminal-renderable string. | svg |
| margin | No | Quiet-zone width in modules around the symbol. The spec recommends 4. | |
| errorCorrection | No | Error-correction level: L (~7% recoverable) to H (~30%). Higher tolerance lowers data capacity. | M |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | Yes | The format that was produced. | |
| content | Yes | The QR artifact: SVG markup, a terminal-renderable string, or base64 PNG bytes for png_base64. | |
| version | Yes | QR symbol version (1–40); higher versions hold denser data and indicate denser content. | |
| mimeType | No | MIME type of content for image formats. Absent for the terminal format. | |
| byteLength | No | Decoded byte size of the PNG. Present only for png_base64. |