Install

Works with Drupal: ^11

Using Composer to manage Drupal site dependencies

Alternative installation files

Download tar.gz 60.75 KB
MD5: 5a2f98235756906f9ec381f74e350901
SHA-1: b0b087d823591c89b610e7858e05f72baeac2243
SHA-256: 4fd60fba36c50a0d212ba5b585e3ce9fc2276c430f574c2e5e8a633b194bbc58
Download zip 104.49 KB
MD5: 321b4f57b829db73cc96f39e010683a0
SHA-1: 5892538df46973c6a8010a0352ca35883054cd63
SHA-256: e51daca45537777be2b9223ded59bfbbd8448a1ff0db94ff67082247c2a8961e

Release notes

Build Drupal Canvas pages with AI agents

Drupal Canvas 1.x has no public API; its authoring code is @internal throughout. Canvas Tools wraps that authoring behavior once, keeps all the coupling to Canvas in two services, and exposes the result as typed Tool API operations. Define the capability once, and every caller gets it: drush tool:run, the AI module through tool_ai_connector, MCP clients through mcp_server_tool_bridge, or your own code. I wrote about why in Define the capability once; call it from anywhere.

Every tool works through Canvas's own auto-save store, the same one the Canvas editor uses. An agent's changes are drafts until something publishes them, and you can review them in the editor first.

What's included

Area Tools
Find targets and components canvas_list_targets, canvas_list_components, canvas_get_component_schema, canvas_get_page_tree
Edit a component tree canvas_add_component, canvas_move_component, canvas_delete_component, canvas_update_component_props, canvas_bind_component_props
Pages canvas_create_page, canvas_update_page_metadata, canvas_delete_page, canvas_set_homepage
Page templates (Canvas 1.11+) canvas_create_page_variant, canvas_set_default_page_variant
Content templates canvas_create_content_template, canvas_update_content_template
Drafts and publishing canvas_list_auto_saves, canvas_discard_auto_save, canvas_publish_auto_saves, canvas_update_site_settings

The module also ships agent skills in .agents/skills for building pages, page templates, content templates and SDC components. They teach an agent the order of operations: look before building, draft, then publish.

Access follows Canvas

The tools apply the same checks as the Canvas editor. That means entity access, edit access to every field a tool writes (including URL aliases), edit access to the component tree field, and view label access on every listed target and draft. Publishing only sends the drafts Canvas lets the user publish. An agent can't do anything the same user couldn't do in the editor.

Requirements

Drupal 11, PHP 8.3, Drupal Canvas 1.7 or later, and Tool API 1.0.0-beta9 or later. Page templates need Canvas 1.11. On Canvas 1.11 and later, theme regions are replaced by page templates, and the tools refuse the page_region target type, with guidance to use a page template instead.

Why beta

Canvas Tools depends on Canvas internals and on Tool API, which is still in beta, so the tool contract may still change before 1.0.0. Two things are still in progress: support for content entities with their own layout (for example, from Canvas Override), and testing against Canvas releases before 1.11. Please try it and open a work item when an agent trips over something.

Created by: mglaman
Created on: 24 Sep 2026 at 19:28 UTC
Last updated: 24 Sep 2026 at 19:29 UTC
New features

Other releases