Provide a Tool plugin so AI agents can set disclosures

AI agents are increasingly the thing creating and editing content — they should be able to record the disclosure for what they made, through the same safe path as other automation.

Proposed resolution: provide one Tool plugin for the Tool API module (https://www.drupal.org/project/tool). The tool wraps the recorder service: inputs entity type/ID (or UUID), grade or profile, and an optional note; it calls DisclosureRecorder::suggest() or apply()/applyProfile(). One tool with a mode input should be enough.

Notes:

  • The tool inherits the recorder's invariants for free: never downgrades severity, never asserts human review, logs dangling references. Also the permissions follows the permissions in the UI.
  • Suggest (non-binding) is the safer default mode for agents; binding apply should be opt-in per site.
  • Add a kernel test executing the tool plugin against a test entity.
Edited by Marcus Johansson