Skip to main content
Glama

Razi Media Tools

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. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.7/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 burden and does so thoroughly. It discloses the exact return shape, that the image is a base64 data URI rather than a hosted link, that nothing is stored, that it runs locally and costs nothing, and that it cannot read or decode QR codes — all behavior beyond what a schema could convey.

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?

Every sentence earns its place: purpose, return format, storage behavior, local execution, read/write limitation, and payload advice. The description is dense but structured, front-loading the core purpose and then layering important behavioral details without redundancy.

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?

Despite having no annotations and no output schema, the description fully compensates by specifying the response format, data URI behavior, side-effect-free execution, and the ignored errorCorrection parameter. An agent has enough context to invoke the tool correctly and interpret its result.

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%, so the baseline is 3. The input schema already documents text, size, and errorCorrection well. The description adds useful context about payload length affecting density, but does not significantly expand parameter semantics beyond what the schema already provides.

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: 'Render text or a URL as a QR code image.' This clearly identifies the tool's function and differentiates it from sibling image tools like compress_image, generate_image, and split_image, which operate on images rather than generating scannable QR codes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states when not to use the tool: 'Writing only — it cannot read or decode an existing QR code.' It also gives practical guidance to shorten long payloads for better scannability, helping the agent decide whether to preprocess input before calling the tool.

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