Skip to main content
drupalreleases
Release: Cms 2.2.3 — Update released for Drupal core (2.2.3)! Release: Easy Breadcrumb 2.0.11 — Minor update available for module easy_breadcrumb (2.0.11). Release: Menu Link Attributes 8.x-1.9 — Minor update available for module menu_link_attributes (8.x-1.9). Release: Bootstrap 8.x-3.42 — Minor update available for theme bootstrap (8.x-3.42). Release: PhotoSwipe - Responsive JavaScript Modal Image Gallery 5.0.11 — Minor update available for module photoswipe (5.0.11). Release: Search API attachments 10.0.13 — Minor update available for module search_api_attachments (10.0.13). Release: amazee.ai Private AI Provider 1.4.6 — Minor update available for module ai_provider_amazeeio (1.4.6). Release: amazee.ai Private AI Provider 1.3.10 — Minor update available for module ai_provider_amazeeio (1.3.10). Module Revived: Bootstrap 8.x-3.41 — Theme bootstrap updated after 6 months of inactivity (8.x-3.41). Security Coverage: Component Library — Module component_library now has official Drupal security advisory coverage.

QR Tool

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.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

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

Release Timeline

Releases

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