Skip to main content
Glama

toolkit-mcp-server: generate QR code

toolkit_generate_qr
Read-onlyIdempotent

Encode 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

TableJSON Schema
NameRequiredDescriptionDefault
dataYesThe 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.
scaleNoPixels per module for raster (png_base64) output. Ignored for terminal.
formatNoOutput format: svg markup, png_base64 (raster bytes), or a terminal-renderable string.svg
marginNoQuiet-zone width in modules around the symbol. The spec recommends 4.
errorCorrectionNoError-correction level: L (~7% recoverable) to H (~30%). Higher tolerance lowers data capacity.M

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatYesThe format that was produced.
contentYesThe QR artifact: SVG markup, a terminal-renderable string, or base64 PNG bytes for png_base64.
versionYesQR symbol version (1–40); higher versions hold denser data and indicate denser content.
mimeTypeNoMIME type of content for image formats. Absent for the terminal format.
byteLengthNoDecoded byte size of the PNG. Present only for png_base64.
Behavior5/5

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

Annotations declare readOnlyHint=true and idempotentHint=true, indicating no side effects. The description adds specific behavioral details: version range (1-40), error type 'data_too_large', and format-specific outputs (inline SVG, base64 PNG with mimeType/byteLength, terminal Unicode). No contradiction.

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?

Single paragraph covering all aspects without wasted words. Could be slightly more structured (e.g., bullet points for formats), but front-loaded with key verb and output details.

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?

Given the tool's moderate complexity (5 params, all covered), output schema existence, and annotations, the description is complete. It explains return values (inline SVG, base64, terminal), error handling, and capacity limits.

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%, baseline 3. Description adds value beyond schema: data example (toolkit_generate_id's ids[0]), scale ignored for terminal, errorCorrection trade-offs (L~7% to H~30%), and margin default rationale (spec recommends 4).

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?

The description clearly states that the tool encodes text or URL into a QR code, using specific verb 'Encode' and resource 'QR code'. It distinguishes from siblings (toolkit_encode_value, toolkit_generate_id, etc.) which are unrelated.

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 description explains what data can be (links, generated IDs, strings), output formats, and error correction levels. It provides context on data capacity limits via errorCorrection, but lacks explicit when-to-use vs alternatives. Siblings are dissimilar, so no confusion.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cyanheads/toolkit-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server