Install
Works with Drupal: ^10.5 || ^11Using Composer to manage Drupal site dependencies
Alternative installation files
Release notes
This release hardens the Drush commands, makes failure responses smarter for LLM callers, and gives connectors a cleaner way to opt into boundary behaviors like entity handles. All three changes come from community contributors — thanks to scottfalconer, Rodel Duterte, and Matt Glaman.
Behavior change: drush tool:run no longer runs as user 1 by default
Previously, drush tool:run executed as the superuser unless told otherwise. It now runs as anonymous when --uid is omitted (or --uid=0); pass an explicit --uid for an enabled account with the tool's required permissions, and use --uid=1 only for deliberate superuser execution. Scripts and automation that relied on the old default must add --uid explicitly.
The commands also fail loudly now: malformed --input values are rejected instead of ignored (JSON input must be an object of named inputs), invalid, missing, or blocked accounts fail before the tool executes, and failures exit non-zero so shell pipelines can detect them.
Changes since 1.0.0-beta7
- #3582970 by scottfalconer: Harden Drush commands — no uid-1 default, loud input errors, non-zero exit codes (see above).
- #3582993 by Rodel Duterte: Failure results are now categorized (input, access, runtime), and the AI connector echoes a tool's input schema back to the model only when different arguments could actually fix the failure. Access denials and runtime errors no longer bloat the context or invite pointless retries.
ExecutableResult::failure()gained an optionalFailureCategoryparameter defaulting to input-correctable, so existing tools keep their current behavior; tool authors should passFailureCategory::AccessorFailureCategory::Runtimewhere those apply. - #3583013 by Matt Glaman: Connectors opt into entity handles at the call site.
ToolManager::createInstance()now accepts anInvokerobject carrying capabilities (for exampleInvokerCapability::EntitiesAsHandles) instead of requiring each connector to register its own event subscriber; the handle transform subscriber moved into Tool API core, and the in-tree MCP and AI connectors are updated. Plain string invoker IDs keep working.
Recommendation
Safe to update, with one review step: audit any drush tool:run automation for a missing --uid before deploying, since it now runs as anonymous rather than user 1. Custom connector authors can drop their own handle-transform subscribers in favor of the new Invoker capabilities, and custom tools should start categorizing their access and runtime failures.