Skip to main content
Glama

Generate a QR code

generate_qr_code
Read-only

Make a static QR code for a link or any text, up to 800 UTF-8 bytes. Returns a 512 px PNG image plus the SVG markup. The data is stored in the code itself, so it never expires and needs no account. Light-on-dark colors are allowed, but some older scanners need dark on light. Errors are returned for empty text, content over 800 bytes, or colors that are not six-digit hex.

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": {
      "text": "<text>"
    },
    "name": "generate_qr_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesLink or text to encode
backgroundNoSix-digit hex color for the background#ffffff
foregroundNoSix-digit hex color for the modules#000000
errorCorrectionNoError correction: L 7%, M 15%, Q 25%, H 30% of the code can be damaged and still scan; higher is denserM

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / errorCorrection / description
      Added value: +"Error correction: L 7%, M 15%, Q 25%, H 30% of the code can be damaged and still scan; higher is denser"
  2. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, non-destructive, closed-world), so the bar is lower. The description still adds real behavior: the return payload is a 512 px PNG plus SVG markup, and it names the three failure conditions (empty text, over 800 bytes, non-six-digit hex). The light-on-dark scanner caveat is genuinely useful operational context.

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?

Four sentences, each carrying distinct payload: capability, output format, static-data semantics, and failure modes. The size limit is front-loaded in the first sentence where it matters most.

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?

With no output schema, the description takes responsibility for describing returns (PNG + SVG) and error behavior, which it does. For a four-parameter generation tool with full schema coverage, nothing an agent needs to invoke it correctly is missing.

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%, so the baseline is 3; the description earns a point by adding constraints the schema lacks — the 800-byte content limit and the six-digit hex validation rule, both of which map directly to the text and color parameters. It does not restate the errorCorrection levels, which the schema already explains well.

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 and resource — 'Make a static QR code for a link or any text' — plus a hard scope boundary (up to 800 UTF-8 bytes). This is unmistakable against siblings like generate_password or generate_uuid, which produce entirely different artifacts.

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?

Provides decision-relevant context: the data is embedded in the code so it never expires and needs no account, which distinguishes it from hosted/dynamic QR services. It stops short of explicit when-not-to-use guidance, though no sibling overlaps enough to warrant routing rules.

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.