Create plugin for altering ArgumentDefinitions in UI

Created on 1 August 2025, 5 days ago

Problem/Motivation

With the ability to create tools in the UI based on tools in code, we want to enable users to refine and restrict parts of a base tool for more focused use cases. One example would be the ability to create a tool based on the 'send_email' tool, with the recipient value preset, or to limit the recipient to a small list of email addresses.

Proposed resolution

Create a 'Alter Argument Definition' plugin of type ArgumentDefinitionModifier, that exposes values from the source definition to be changed. We need to be mindful of what can and can't be changed:

  • (immutable) @param string $data_type
  • (mutable)@param string|null|\Stringable $label
  • (immutable*)@param bool $required (if required made optional, default value will need to be required)
  • (immutable) @param bool $multiple
  • (mutable)@param string|null $description
  • (mutable)@param mixed $default_value
  • (mutable)@param array $constraints
  • (immutable)@param bool $locked
  • (mutable)@param array $form_alter
  • (mutable)@param array $config_schema_override

A constraints UI likely creates the most complexity here.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Active

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States michaellander

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024