Skip to main content
Glama
cyanheads

toolkit-mcp-server

by cyanheads

toolkit-mcp-server: generate QR code

toolkit_generate_qr
Read-onlyIdempotent

Turn any text or URL into a QR code. Get output as SVG markup, base64 PNG, or terminal-renderable characters with adjustable error correction and size.

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. png_base64 renders (modules + 2 × margin) × scale pixels per side and rejects anything past 2048 px with a typed raster_too_large error, so a dense symbol needs a lower scale; svg carries no such limit.

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. png_base64 also bounds the whole image at 2048 px per side, so a dense symbol or a wide margin admits a lower scale than 32.
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
errorNoPresent when the call failed. Absent on success.
formatNoThe format that was produced.
contentNoThe QR artifact: SVG markup, a terminal-renderable string, or base64 PNG bytes for png_base64.
versionNoQR 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?

Beyond the annotations, the description discloses important runtime behavior: exact output forms per format, the returned QR version, the png_base64 pixel formula, the 2048-pixel rejection limit, and the typed raster_too_large error. It also notes that svg has no such size limit, which is valuable behavioral context an agent cannot infer from annotations or schema alone.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core action and then proceeds logically through data, format, error correction, margin, scale, and constraints. Every sentence adds practical information, and the detail is proportionate to the tool's five-parameter complexity with no 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?

Given five parameters, an output schema, and the presence of siblings, the description covers everything needed to invoke the tool correctly: parameter semantics, format-specific behavior, capacity limits, error types, and interaction effects. Nothing essential is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Even though schema description coverage is 100%, the description enriches the parameters substantially by explaining how they interact: errorCorrection trades capacity for damage tolerance, scale is bounded by image size, and dense data may force a lower scale. It also clarifies return-value details like mimeType and byteLength, adding meaning beyond the raw schema entries.

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 opens with a specific verb and resource: 'Encode text or a URL into a QR code.' It then enumerates the three output formats, making it unmistakable what the tool produces and clearly distinguishing it from siblings like toolkit_hash_value, toolkit_encode_value, and toolkit_generate_id.

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 clearly establishes when it is appropriate to use the tool by explaining its purpose and giving concrete examples of valid data, including a generated identifier from toolkit_generate_id. It does not explicitly list when-not-to-use cases or name alternative tools as a routing hint, so it stops short of a 5.

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