Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Sutram: WebMCP tools and command console for Drupal

No security coverage Under active development

Sutram allows AI agents to interact with your Drupal site through commands rather than clicks, mimicking how users navigate the site. It provides a standardized way for Drupal modules to expose their functionality, making these actions available as tools for browser agents, JavaScript calls, and a command-line interface. This enables programmatic control over Drupal content and actions without requiring direct UI interaction.

Sutram gives Drupal modules one standard way to expose what they can do, as commands for AI agents and for people. Each registered command becomes:

  • a WebMCP tool, for agents in browsers that support WebMCP;
  • a JavaScript call (Sutram.call()), for headless browsers, tests and browser agents;
  • a line in a terminal-like console, for people and agents.
This is a developer api.

You would need an integration module to expose the available tools to webmcp.

This module ships with some demo modules to be used for reference implementation.

  1. sutram_demo_form
  2. sutram_demo_nav
  3. sutram_demo_page
  4. sutram_demo_user
  5. sutram_demo_canvas

The demo form commands in the console: list the forms on the page, fill two fields, save. Saving asks first.

How it works

A module registers a command in JavaScript: a name, a JSON Schema for its input, and a function. Sutram does the rest. This module ships the Sutram library and the console; it registers no Drupal commands of its own. Its demo submodules add commands for menus (nav), the current page (page) and content forms (form).

Why not just WebMCP?

WebMCP is how a page hands tools to an agent. It does not say which tools a page has, how they are named, or how a dozen modules share one page. Sutram is that layer, and WebMCP is one of the ways out of it:

  • One registry for every module. Modules register commands the same way, with one command grammar, instead of each inventing its own tools.
  • People see what agents see. Every tool is also a console command, so you can type exactly what the agent would call.
  • Few tools, stable list. form set <form> … is one tool for every form on the site, not one tool per form.
  • Works before WebMCP does. Browser agents and tests call the same commands through Sutram.call() today.

Sutram registers tools through WebMCP's own registerTool() and never reads or changes the page's HTML. It does not replace Playwright or browser agents: they call its commands instead of clicking.

Safe by design

Sutram runs in the page, as the logged-in user. It adds no route, no endpoint and no PHP API, so an agent can do only what the user can already do. Commands that are hard to undo ask first.

Getting started

  1. composer require drupal/sutram and drush en sutram (and the demo submodules, if you want them).
  2. Give the Use Sutram permission to the roles that should have it.
  3. On any page, press ` (outside text fields) or Ctrl+Shift+K and type help.

No CDN and no build step: the library is shipped in the module.

Documentation

Ask your assistant about Sutram: WebMCP tools and command console for Drupal

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
11
Tracked since
Oct 2026
Latest release
1 month ago
Releases (12 mo)
11 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
1.0.0-alpha1 Pre-release 11 Oct 16, 2026