Skip to main content
Glama

generate_qr_code

Render text or a URL as a QR code image. Returns JSON { dataUrl, text, size } where dataUrl is a base64 PNG data URI embedded in the response — not a hosted link, so nothing is stored and the image cannot be fetched later. Runs locally and costs nothing. Writing only — it cannot read or decode an existing QR code. A long payload makes a denser, less scannable code, so shorten the address by other means before encoding it if you can.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sizeNoWidth and height of the output PNG in pixels; the code is always square. Default 300. Only applied when given as a number.
textYesThe exact payload to encode. A URL must include its scheme to be actionable when scanned. Very long values force a denser code that is harder to scan.
errorCorrectionNoDeclared for compatibility but currently ignored — the code is always generated at the library default, level M (about 15% damage tolerance).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral disclosure burden and does so thoroughly. It reveals that output is a base64 data URI rather than a hosted link, emphasizes that nothing is stored and the image cannot be fetched later, states it runs locally at no cost, and clarifies the writing-only limitation. It also warns about density/scannability tradeoffs for long payloads.

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 well-structured and front-loaded with the essential purpose, followed by output format, privacy implications, and limitations. Every sentence carries valuable information, and there is no redundancy or 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 that there is no output schema, the description compensates by clearly specifying the return shape and the nature of the dataUrl. It also covers privacy, cost, side effects, and payload constraints, making the tool fully understandable for an agent without requiring additional context.

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?

The input schema already has 100% description coverage for all three parameters, so the description does not need to repeat parameter details. It adds useful behavioral context about long payloads becoming denser and less scannable, but this reinforces rather than meaningfully extends the schema's own guidance.

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 'Render text or a URL as a QR code image,' a specific verb and resource that clearly identifies the tool's purpose. It further distinguishes itself by noting it is writing-only and cannot decode a QR code, setting it apart from any potential sibling ambiguity.

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 states when to use the tool: to render text or a URL as a QR code. It also gives a when-not condition, explicitly noting it cannot read or decode an existing QR code, and advises shortening payloads before encoding. However, it does not explicitly name a sibling tool as an alternative, only referring vaguely to 'other means.'

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