Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Drupal Canvas Tools

No security coverage Under active development 72 sites

Part of the Canvas ecosystem · 42 projects

This module provides a command-line interface for building Drupal Canvas pages using AI agents or scripts. It exposes a set of Tool API operations to manage page creation, component placement, property settings, and content templates. These operations can be executed via Drush or an AI agent through MCP.

Canvas Tools lets an AI agent, or any script, build Drupal Canvas pages, page templates and content templates through typed Tool API operations instead of the browser.

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

Features

  • Drafts first. Every change goes to Canvas's auto-save store, the same drafts the Canvas editor uses. Nothing goes live until the drafts are published, and a person can review them in the editor first.
  • The whole authoring workflow. Find targets and components, create pages, place and arrange components, set props or bind them to entity fields, manage content templates and page templates, then publish or discard.
  • The same access as the editor. The tools check entity access, edit access to every field they write, and edit access to the component tree. Lists only show what the user may see. An agent can't do anything the same user couldn't do in the Canvas editor.
  • Built for agents. Every input has a typed schema, target types are advertised as an enum, lists are paged, and refusals say what to do instead.
  • Agent skills included. .agents/skills ships 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.

Post-installation

The module adds no configuration or permissions of its own. The tools use Canvas's permissions, such as edit canvas_page, administer content templates and publish auto-saves, so give the account the agent acts as the same roles a person would need.

Try it from Drush:

drush tool:run canvas_list_targets --input='{"target_type":"page"}'
drush tool:run canvas_list_components

To give an AI agent access over MCP, enable MCP Server and MCP Server Tool Bridge. Canvas Tools ships an MCP tool configuration for every operation, imported automatically when the bridge is enabled.

Projects using AI Best Practices get the skills synced into the project's .agents/skills on composer install. Otherwise, point your agent at the module's .agents/skills directory.

Additional requirements

  • Drupal 11 and PHP 8.3
  • Drupal Canvas 1.7 or later. Page templates need Canvas 1.11.
  • Tool API 1.0.0-beta9 or later

Because Canvas 1.x has no stable API, a new Canvas minor release may need a new Canvas Tools release.

Recommended modules

  • MCP Server and MCP Server Tool Bridge: expose the operations to AI agents over MCP.
  • Tool Belt: ready-made Tool API operations for content modeling, such as content types, fields and nodes. Together with Canvas Tools, an agent can model a content type and lay out its content template.
  • Tool API's tool_ai_connector submodule: exposes the operations to the AI module's agents.

Project status

Canvas Tools is in beta. It depends on Canvas internals and on Tool API, which is also in beta, so the tool contract may still change before 1.0.0. Please open a work item when an agent trips over something.

Ask your assistant about Drupal Canvas Tools

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

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
Jul 2026
Latest release
3 weeks ago
Releases (12 mo)
3 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
1.0.0-beta2 Pre-release 11 PHP >=8.3 Sep 29, 2026
1.0.0-beta1 Pre-release 11 PHP >=8.3 Sep 24, 2026
1.0.x-dev Dev 11 Jul 23, 2026