Install

Works with Drupal: ^10.5 || ^11

Using Composer to manage Drupal site dependencies

Alternative installation files

Download tar.gz 432.26 KB
MD5: f3810f9ef3b5a6f983526c5fe50fd208
SHA-1: bf1df46adb8bc309c73f72383e65ac9b308e1811
SHA-256: 04b32f0ce7bd4f1b1d5ff303e5d0933a48f9e59253f2bd30d265e9dfdbc4038a
Download zip 575.75 KB
MD5: e2d1a127bf1d55012ae7cb6deb14112b
SHA-1: d1393ead0787a548914ede4439fdc654933ce523
SHA-256: 2e10130b705ac5c413cdb716ba31f832e002ba85c0a409033b23cf97582eca91

Release notes

This release gives outputs their own definition family with a short conversion window, lets tool authors ship example values that reach the LLM-facing schema, and fixes a missing core dependency that broke fresh installs. Thanks to mglaman for the output definition work and review of the examples feature, COBadger for review of the output family, and ckaotik for reporting the missing dependency.

Deprecation: declare outputs with the new OutputDefinition classes

Outputs now mirror inputs with their own definition family: OutputDefinition, EntityOutputDefinition, ListOutputDefinition, and MapOutputDefinition, all implementing a new OutputDefinitionInterface that the output APIs and events are typed against. The constructors take the same arguments in the same order as their InputDefinition counterparts, minus locked — and description is required, so every output carries one in the schema a model sees.

Declaring an output with core's ContextDefinition or EntityContextDefinition, or this module's MapContextDefinition or ListContextDefinition, is deprecated in 1.0.0-beta9 and removed in 1.0.0-beta10 (#3583019). A temporary bridge keeps those declarations loading — converting them to the matching output class and synthesizing a missing description from the label — so nothing breaks today, but the window is short: swap the class names in your #[Tool] attributes now. Event subscribers are affected immediately: ToolOutputDefinitionNormalizeEvent::setDefinition() and both output events now require OutputDefinitionInterface, so a subscriber that swaps in a core definition fails with a type error.

Changes since 1.0.0-beta8

  • #3583015 by mglaman: Add an OutputDefinition family for typed outputs (see above). The Drush generator, the developer docs, and the create-tool-plugins skill all scaffold and teach the new classes.
  • #3583014 by michaellander: Input definitions can carry example values, emitted as the JSON Schema examples keyword beside default. Declare them in the attribute with the new trailing examples: constructor argument on InputDefinition and EntityInputDefinition, or call setExamples() on any input definition — any, list, and map inputs included. Examples always describe a single value: on a multiple: TRUE input they land on the item schema. They are annotations, emitted verbatim and never validated at runtime; a subscriber or refiner that re-types an input in place is responsible for updating or clearing them, the same contract that applies to default_value.
  • #3583022 reported by ckaotik: The module now declares its dependency on core's Serialization module, whose absence made installing tool fatal. A post-update hook enables Serialization on existing sites, and the installation docs no longer claim the module has no dependencies.

Update instructions

Run database updates (drush updb) — a first for this module: the post-update enables core Serialization where it is not already installed. Beyond that the update is drop-in, with two things to review:

  • If any of your modules declare output_definitions with core context classes, expect a deprecation notice per declaration when plugin caches rebuild — and deprecation-strict test suites will surface them loudly. The fix is the class-name swap described above; do it during this release cycle, before the bridge is removed.
  • If you subscribe to the output definition events, make sure anything you pass to setDefinition() is one of the new output classes.
Created by: michaellander
Created on: 18 Sep 2026 at 03:26 UTC
Last updated: 18 Sep 2026 at 03:28 UTC
Bug fixes
New features

Other releases