Drupal is a registered trademark of Dries Buytaert

tool

136 sites Security covered
View on drupal.org

A pluggable API for defining executable logic with typed Inputs and Outputs.

The Tool API module provides a modern, typed, and extensible framework for defining executable units of logic in Drupal. Think of it as a next-generation replacement for core Actions—but with clear input/output schemas, less ambiguity, and designed to be reused across different systems.

Tools are defined with typed Inputs and Outputs, making them easy to validate, document, and reuse. They can power everything from workflow engines to AI agents, or simply provide cleaner APIs for developers who need to expose functionality in a structured way. Tools are expected to be usable completely from configuration or from arguments passed at call time, or with a mix of both.

Why Tool API?

Drupal’s current Actions API is useful but limited:

  • Input is loosely defined, outputs are non-existent.
  • Inputs, Form and Configuration are all 'defined' separately, without anything binding them together.
  • Extending Actions for new use cases (e.g., AI integration, automation engines) is difficult.

Tool API addresses these problems by:

  • Inputs and Outputs, and Results message built into the contract
  • Using ContextDefinition-style typed data to make every tool self-describing
  • Allowing hierarchical/nested definitions to cover complex use cases.
  • Forms and config schema automatically generated from Input Definitions(WIP)
  • Automatic token support (WIP)
  • Form and schema altering based on usage (WIP)

Use Cases

  • Developers: expose custom functionality as reusable Tools instead of writing custom Actions/Conditions.
  • Workflow Builders: plug Tools into ECA or Rules-style engines with clear input/output schemas.
  • AI Integrations: Tools can be exported as JSON Schema for use in OpenAI/Anthropic tool-calling, allowing Drupal functionality to be safely invoked by AI agents.
  • Site Builders: more predictable and validated Actions when building automations.

Roadmap

Tools comes packaged with tool_ai_connector to start using for AI function_calling right away. This also allows you to start using the module with MCP and AI Agents immediately. Direct integration with MCP is coming very soon, and then support for creating actions and using with ECA is to follow.

I'm also working on a Tool Refiner module that will allow users to define preconfigured versions of existing tools with some values preset and/or additional constraints added. This allows you to expose specialist versions of tools to other modules without having to make a tools full unrestricted capabilities available.

Supporting this Module

Creation of this module and my work toward the AI initiative have been split between donating my own time and supporting organizations. If you are interested in supporting my efforts, please reach out through direct message or Drupal slack.

Activity

Total releases
11
First release
Aug 2025
Latest release
2 months ago
Release cadence
10 days
Stability
0% stable

Release Timeline

Releases

Version Type Release date
1.0.0-alpha10 Pre-release Dec 6, 2025
1.0.0-alpha9 Pre-release Nov 20, 2025
1.0.0-alpha8 Pre-release Nov 13, 2025
1.0.0-alpha7 Pre-release Nov 10, 2025
1.0.0-alpha6 Pre-release Oct 27, 2025
1.0.0-alpha5 Pre-release Oct 20, 2025
1.0.0-alpha4 Pre-release Oct 10, 2025
1.0.0-alpha3 Pre-release Oct 10, 2025
1.0.0-alpha2 Pre-release Aug 28, 2025
1.0.x-dev Dev Aug 27, 2025
1.0.0-alpha1 Pre-release Aug 27, 2025