Skip to content

Tool submodules

Two submodules hold Tool API tools meant for other projects. Each depends on Tool API and core only, Site Agent Pathauto on Pathauto too, so each can move upstream unchanged. Both are experimental while Tool API is in beta.

Site Agent Tool Belt

Site-building tools Tool Belt lacks. Each checks the permission of the admin screen it mirrors; tools whose module isn't installed are hidden.

Tool Does Permission
site_agent_tool_belt:display_describe Lists the fields of a form or view display, with widgets or formatters. administer TYPE form display or administer TYPE display
site_agent_tool_belt:display_component_set Shows, configures or hides one field on a form or view display. The same
site_agent_tool_belt:entity_revision_list Lists a content entity's revisions, newest first, a page at a time: ID, time, author, log message, published, moderation state and whether it is the default revision. view all revisions access, as the Revisions tab: for a node, view all revisions, view TYPE revisions or administer nodes
site_agent_tool_belt:entity_revision_diff Compares two revisions, or one with the default revision, and lists the fields that differ with their labels and values. Revision metadata and computed fields are left out, as core's change detection leaves them out. view revision access to both, as a revision's page
site_agent_tool_belt:entity_revision_revert Saves an earlier revision's values as a new pending revision, in the workflow's draft state under a workflow; the default revision can't be reverted to. revert revision access for a node, revert for types with core's revision routes, as the revert form
site_agent_tool_belt:role_permissions_get Lists roles and their permissions. administer permissions
site_agent_tool_belt:role_permissions_set Grants and revokes permissions of a role. Destructive. administer permissions
site_agent_tool_belt:block_list Lists a theme's regions and the blocks in them. Needs Block. administer blocks
site_agent_tool_belt:block_place Places a block, or moves or changes a placed one. Needs Block. administer blocks
site_agent_tool_belt:log_entries_recent Reads the latest database log messages. Needs Database Logging. access site reports
site_agent_tool_belt:entity_translation_set Adds or changes one translation of a content entity as a pending revision of its language, a draft under a workflow. Refuses a bundle without translation, an unknown language, the original language and a field shared by every language. Needs Content Translation. What core's translation routes check: for a new translation, view access and translate any entity or Content Translation's create access; for a change, update access, translate any entity or its update access
site_agent_tool_belt:entity_bulk_create Creates up to 25 entities of one type, each with its bundle and field values, as drafts: in the workflow's "draft" state, or unpublished. Validates every item before saving any; a save that fails stops the call and keeps the items saved. Create access to each item's bundle, and edit access to each field
site_agent_tool_belt:entity_bulk_update Changes the fields given of up to 25 entities of one type, on the latest revision, as drafts: in the workflow's "draft" state, or a pending revision of a published entity. Validates and saves as bulk create does. Update access to each entity, and edit access to each field
site_agent_tool_belt:entity_bulk_delete Deletes up to 25 entities of one type, permanently, through the storage's delete of several entities, in one transaction: all or none. Destructive, so it prompts every time. In neither shipped toolset. Delete access to each entity
site_agent_tool_belt:language_list Lists the site's languages, with the default. Needs Language. None
site_agent_tool_belt:menu_tree Lists the menus, or a menu's links as a tree. administer menu
site_agent_tool_belt:menu_add Adds a menu, or changes its label and description. administer menu
site_agent_tool_belt:menu_link_set Adds or changes a menu link, a content entity. Needs Menu Link Content. administer menu
site_agent_tool_belt:term_tree Lists the vocabularies, or a vocabulary's terms as a tree in the overview's order: ID, uuid, name, weight and published. At most 500 terms, narrowed by a parent term or a depth. Needs Taxonomy. access content, and view or update access to each term; a term hidden hides the terms under it
site_agent_tool_belt:term_move Sets a term's parent and weight, live, as a new default revision. Refuses a term with a draft waiting, a parent in another vocabulary or under the term itself, and what core's hierarchy check refuses. Needs Taxonomy. Update access to the term: edit terms in VOCABULARY or administer taxonomy
site_agent_tool_belt:view_describe Lists a view's displays and one display's filters, sorts, fields and pager. Needs Views. administer views
site_agent_tool_belt:view_handlers_available Lists the Views base tables, or the fields, filters, sorts, relationships, contextual filters and areas Views offers for one, narrowed by type, group or keyword. Needs Views. administer views
site_agent_tool_belt:view_display_edit Adds, changes or removes one filter, sort or field of an existing display, or changes its pager. Needs Views. administer views
site_agent_tool_belt:view_clone Copies a view; the copy stays disabled while a display has a path. Needs Views. administer views
site_agent_tool_belt:view_create Creates a view of a base table with one page or block display, starting as the Views UI wizard starts one: one field, the published filter where the entity has one, and the access permission given. A view with a page stays disabled, and its path must not be in use. Needs Views. administer views
site_agent_tool_belt:site_settings_get Reads the site name, slogan, email address, front page and 403 and 404 pages, with the entity and title each page path leads to. administer site configuration
site_agent_tool_belt:site_settings_set Changes any of those settings. A page path must start with a slash and lead to a page the user can see; an alias is saved as its system path. administer site configuration

A new view starts as a clone or with one display. No tool enables a view with a page: a person enables it in Views.

The configuration-writing tools extend ConfigToolBase, which checks the site_agent_tool_belt.config_write_gate service in both access() and execute() and reports a Config Read-only refusal as a failed call. On its own the gate locks writes where Config Read-only is active; with Site Agent installed, the service follows the structure gate instead.

Site Agent Pathauto

Tool Does Permission
site_agent_pathauto:pattern_list Lists the URL alias patterns and the pattern types. administer pathauto
site_agent_pathauto:pattern_set Adds a pattern, or changes its label, pattern, bundles, weight or status. administer pathauto

site_agent_pathauto:pattern_set checks the site_agent_pathauto.config_write_gate service the same way.

Site Agent Webform

Tools for Webform, depending on Tool API, core and Webform only. Installing the submodule adds the webform tools, not the submission reads, to the Site builder toolset, reads pre-approved and writes waiting for approval; uninstalling it takes them out of every toolset.

Tool Does Access
site_agent_webform:webform_list Lists the webforms: title, categories, status, whether each is open now, template, archived and element count. access webform overview, administer webform or administer webform submission, as the Webforms screen
site_agent_webform:webform_describe Describes one webform: its elements as YAML source and as a list with type, title, parent and required; its handlers with their settings; the settings that differ from the defaults. Update access to the webform: administer webform, edit any webform, edit own webform for its owner, or the webform's own access rules
site_agent_webform:webform_create Creates a webform with its title, description, categories, status and settings, and optionally its elements as YAML source. create webform or administer webform; with elements, edit webform source too
site_agent_webform:webform_update Changes a webform's title, description, categories, status (open or closed) or settings. Update access to the webform
site_agent_webform:element_set Adds an element, at the top level or in a container, or changes the properties of one. Update access to the webform
site_agent_webform:element_remove Removes an element and the elements inside it, and, as Webform's Delete does, the values submissions stored for them. Destructive. Update access to the webform
site_agent_webform:submission_list Lists a webform's submissions, newest first, a page at a time, with the total: serial number, dates, draft, language, owner's user ID, sticky and locked. No values; drafts only when asked for. submission_view_any access to the webform, as its Results screen
site_agent_webform:submission_read Reads one submission: what the list gives, and the title and value as text of each element the account may view. The same

The writes extend the submodule's ConfigToolBase, which checks the site_agent_webform.config_write_gate service the same way, validates elements with Webform's elements validator, and proposes the webform's configuration, its elements YAML included, for the approval card.

Submissions hold visitors' personal data, and what a tool reads goes to the model's provider. The submission reads are in neither default toolset: the submodule's optional configuration adds a Webform results toolset, installed where Site Agent is, with the webform list and the two reads. Listing is pre-approved; reading a submission asks once per thread. A site grants use webform_results toolset only to roles that may share that data with the provider. Webform gives submission_view_any to every account that may edit the webform, administer webform included, so for those accounts the toolset permission decides whether the model reads submissions. No tool changes or deletes a submission.