Skip to main content
Glama

Generar código QR

qr-encode
Read-onlyIdempotent

Codifica un texto como código QR (ISO/IEC 18004, versiones 1 a 40, corrección L/M/Q/H, modo numérico, alfanumérico o bytes UTF-8) y devuelve la matriz de módulos y un SVG. Cuándo: hay que convertir bytes o texto a esta codificación, o desde ella, con exactitud y sin adivinar. No para: construir una URI data (data-uri-build). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.

EN: Encodes text as a QR Code (ISO/IEC 18004, versions 1-40, error correction L/M/Q/H, numeric, alphanumeric or UTF-8 byte mode, automatic mask) and returns the module matrix and an SVG. Port of the Nayuki reference encoder; no image decoding. When: bytes or text have to be converted to or from this encoding exactly, without guessing. [EN completo / full EN: inputSchema.description]

Input Schema

NameRequiredDescriptionDefault
eccNoError correction level: L ~7 %, M ~15 %, Q ~25 %, H ~30 % of codewords recoverable (optional; one of: L, M, Q, H; default "M").M
darkNoDark module color (string; optional; default "#000000"; up to 7 chars; pattern ^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$).#000000
maskNoMask pattern 0-7, or -1 to choose by the ISO penalty rules (integer; optional; default -1; min -1; max 7).
modeNoEncoding mode; auto picks numeric, alphanumeric or byte for the whole text (optional; one of: auto, numeric, alphanumeric, byte; default "auto").auto
textYesText to encode (UTF-8 in byte mode; at most 2953 bytes at version 40-L) (string; required; up to 7089 chars).
lightNoLight module color (string; optional; default "#ffffff"; up to 7 chars; pattern ^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$).#ffffff
borderNoQuiet-zone width in modules for the SVG (the standard asks for 4) (integer; optional; default 4; min 0; max 16).
boost_eccNoRaise the ECC level while the version does not grow (boolean; optional; default false).
include_svgNoInclude the SVG string (boolean; optional; default true).
max_versionNoLargest version allowed (integer; optional; default 40; min 1; max 40).
min_versionNoSmallest version allowed (integer; optional; default 1; min 1; max 40).
include_matrixNoInclude the module matrix (rows of "1" dark / "0" light) (boolean; optional; default true).

Output Schema

NameRequiredDescriptionDefault
eccNo
svgNo
maskNo
modeNo
sizeNo
modulesNo
versionNo
data_bytesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / text / examples
      Added value: +[
      +  "HELLO WORLD"
      +]
  2. Added

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered; the description still adds real value with hard operational limits (64 KB JSON input, 1 s per call, 1 MB result) and the reporting of the implementation lineage (Nayuki reference port, no image decoding). It restates determinism and 'no side effects', which partly duplicates the annotations, but the size/latency limits are information an agent can only get here.

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

Conciseness3/5

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

Capability and constraints are front-loaded, which is good, but the text is duplicated across ES and EN and then defers to '[EN completo / full EN: inputSchema.description]', a meta-reference rather than content. The bilingual duplication nearly doubles length without adding information an agent does not get elsewhere.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 12 parameters, a matching output schema, and annotations carrying the safety profile, the description covers what an agent needs: inputs, both return artifacts, determinism, and size/time budgets. It does not explain how the bootstrap flags (min_version/max_version, boost_ecc, include_matrix/include_svg) interact, but those are schema-documented and the consequence of omitting them is small.

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

Parameters3/5

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

Schema description coverage is 100% and the output schema exists, so the schema already documents all 12 parameters including enums, defaults, patterns and ranges. The description only echoes the ECC levels, mode choices and automatic mask in prose, adding no format or interaction detail beyond the schema — baseline 3 applies.

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+resource ('Codifica un texto como código QR') and immediately pins down the standard (ISO/IEC 18004), version range, ECC levels, modes, and outputs (module matrix + SVG). It also names the sibling it is not for (data-uri-build), so an agent can discriminate it inside a very large tool catalog without opening the schema.

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?

Has an explicit 'Cuándo' clause and an explicit 'No para' routing to data-uri-build, which is exactly the when/when-not pattern. Minor deduction: the phrase 'convertir bytes o texto a esta codificación, o desde ella' implies a bidirectional conversion, but the tool only encodes — that could momentarily confuse an agent looking for decoding.

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.

Resources