Drupal is a registered trademark of Dries Buytaert
Release: Leaflet 10.4.11 Minor update available for module leaflet (10.4.11). Release: Session Inspector 1.0.8 Minor update available for module session_inspector (1.0.8). Release: Migrate QA 2.0.4 Minor update available for module migrate_qa (2.0.4). Release: CKEditor Description List 3.0.0 Major update available for module ckeditor_descriptionlist (3.0.0). Release: FlowDrop 2.4.0 Minor update available for module flowdrop (2.4.0). Release: JWT Token Refresh 1.0.4 Minor update available for module jwt_token_refresh (1.0.4). Release: ConReg 1.0.0-beta1 First beta version released for module conreg (1.0.0-beta1). Release: AI Image Studio 1.0.0-beta8 New beta version released for module ai_image_studio (1.0.0-beta8). Usage Milestone: Role Theme Switcher Module role_theme_switcher crossed 1,000 active installs. Module Revived: Decoupled Router 2.0.7 Module decoupled_router updated after 11 months of inactivity (2.0.7).

QR Tool

2 sites No security coverage
View on drupal.org

This module generates QR codes from provided links and saves them as PNG images in your Drupal installation. It then returns the URL of the generated image, reusing existing files for the same input to avoid duplicates.

A lightweight QR code builder for Drupal. Takes a link as input, generates a PNG on the file system using the endroid/qr-code library, and returns the absolute URL of the saved image.

The image is written to public://qr-codes/qr-{hash}.png as a managed Drupal file, with a stable filename per (link, size) so repeated calls reuse the same file instead of multiplying them.

Disclaimer: All of the code was generated using AI Agents for this module, under human supervision.

Requirements

  • Tool - the plugin API this module exposes a tool through.
  • endroid/qr-code ^6.0 - pulled in automatically via Composer.

Install

composer require drupal/qr_tool
drush en qr_tool

Then grant the Generate QR codes via tool permission to whichever role or agent should be allowed to invoke the tool.

Inputs

Name Type Required Description link string yes URL or text to encode into the QR code. size integer no Edge length in pixels. Defaults to 300; clamped to the range
50–1000.

Output

The tool returns:

  • url - absolute URL to the generated PNG.
  • file_uri - the public://... stream URI.
  • fid - managed file ID.
  • size - the rendered edge length in pixels.

Where it fits

qr_tool is a single Tool plugin, so anything that speaks the Tool API can call it:

  • External coding agents (Claude Code, Cursor, Codex, etc.) via an MCP bridge or any HTTP transport that exposes Drupal tools.
  • Drupal AI Agents - add the tool to an agent's allowed-tool list and prompt it with phrases like “generate a QR code for this URL”.
  • FlowDrop - drop the tool into a flow step to mint a QR for any URL produced earlier in the flow.
  • ECA - install ECA Tool and the QR tool becomes available as an ECA action, so you can generate QR codes from any ECA event (node save, webform submission, cron, etc.) without writing code.
  • Trigger it manually in three lines of code.

Activity

Tracked releases
3
Tracked since
May 2026
Latest release
3 months ago
Releases (12 mo)
3 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Release date
1.0.0-beta2 Pre-release May 13, 2026
1.0.0-beta1 Pre-release May 11, 2026
1.0.x-dev Dev May 11, 2026