Install
Works with Drupal: ^10.5 || ^11Using Composer to manage Drupal site dependencies
Alternative installation files
Release notes
Beta11 is about trust at the boundary: a declared access gate that runs before any caller input is processed, wire output that matches the advertised schema byte for byte, and messages that read the same whether a person or a model receives them.
Declared permissions and the invoker contract
- A tool can declare its access rule on the definition:
#[Tool(permission: 'administer nodes')], with route grammar for several (,requires all,+any).ToolManager::checkPermission($definition, $account)answers for catalogs, pickers, and forms without instantiating the plugin (#3583064). - Every invoker checks the declared permission before processing any caller input: an account without it is denied before entity handles resolve, refiners query storage, or violation text is composed from its values. The ordering is documented as the invoker contract in docs/developers ("Invoking a tool") for external invokers to follow (#3583077). A permission denial can therefore precede input feedback.
- A tool that declares neither a permission nor an access override is rejected at discovery. Declare value-independent rules as
permission; keepcheckAccess()for rules that need the values.
Required means present: the map rule
required now means present and not NULL, for inputs and outputs, lists and maps, matching JSON Schema (#3583069). An empty list or map is a value. "Must not be empty" is an explicit NotBlank or Count, published as minItems/minProperties.
Behavior change: a multiple input declaring NotNull, or NotBlank without allowNull, accepts [] again, as it did before beta10 — beta10's rejection was a side effect. To reject an empty list, declare NotBlank on the list, which publishes minItems: 1. Consumers that worked around required-but-empty outputs can drop the workaround.
The wire matches the schema
- Floats declared as decimals are spelled as decimal strings at 15 significant digits:
0.3, not0.30000000000000004(#3583067). - A map whose keys run 0, 1, 2… serializes as a JSON object, as its schema advertises, instead of a JSON array (#3583073). Entities inside such maps still leave
tool:runas references. - An optional value that may be null lists
nullin its enum, so strict validators accept the null the type allows; the AI connector removes it again for providers that reject it (#3583072). - A plain definition declared with
data_type: 'map'advertises as an object on every supported core; before Drupal 11.1 it came out as a string, which made mcp_server reject the very arguments the tool needed (#3583071).
Messages read as intended
- Failure messages reach terminals and models as plain text: quotes print as quotes, not
"(#3583042). - Output-violation failures no longer carry typed-data class prefixes; the detail stays in the log (#3583057).
- When an invoker cannot pass entities, the "must be an entity" violation says what to do instead (#3583046).
- A denied Explorer execution page no longer offers an Execute button, and a denied submission reports once, without internal exception text (#3583079).
Testing
- Drupal 10 test discovery works again: the manual
previous majorCI job gets past discovery (#3583081). Broader Drupal 10 PHPUnit compatibility is tracked in #3583074.
Upgrading from beta10
No schema or API removals. Watch for: the converted-multiples [] acceptance above; a required map output may now reach clients as {}; zero-keyed map outputs arrive as objects where tolerant clients previously saw arrays; permission-declaring tools deny before input feedback; and failure messages are now plain text on the drush and AI paths.