Add new event that can be exposed as tool to AI module

Issue information

From user: jurgenhaas

Related to !514 (merged)

Contribution record

Fork management

Problem/Motivation

We had considered exposing all ECA action plugins to AI, especially to agents and to MCP, but it turns out that for 2 reasons that's not a valid approach:

  • The action plugins are far too granular
  • They are missing metadata that would be necessary for agents and MCP to make use of them

Instead, let's expose custom events. They are the starting point for small or large models that provide some functionality, taking specified input and provide their result as structured output.

Proposed resolution

Let's enhance the custom event configuration such that the user can optionally provide extra metadata like input specification, description, etc., and then provide a plugin deriver to expose that custom event as a plugin implementing \Drupal\ai\Service\FunctionCalling\ExecutableFunctionCallInterface.

Edited by drupalbot
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information