Drupal is a registered trademark of Dries Buytaert
drupal 10.6.8 Update released for Drupal core (10.6.8)! drupal 11.3.9 Update released for Drupal core (11.3.9)! drupal 11.3.8 Update released for Drupal core (11.3.8)! drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! linkit 7.0.14 Minor update available for module linkit (7.0.14). migrate_tools 6.1.4 Minor update available for module migrate_tools (6.1.4). diff 2.0.0 Major update available for module diff (2.0.0). masquerade 8.x-2.2 Minor update available for module masquerade (8.x-2.2). video_embed_field 3.1.0 Minor update available for module video_embed_field (3.1.0). bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). colorbox_inline 2.1.1 Minor update available for module colorbox_inline (2.1.1). node_view_permissions 8.x-1.7 Minor update available for module node_view_permissions (8.x-1.7).

qr_tool

No security coverage
View on drupal.org

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

Total releases
3
First release
May 2026
Latest release
18 hours ago
Release cadence
1 day
Stability
0% stable

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