Automatically insert and delete parameter on components

Hi,
I’m working on developing a Copilot like assistant for grasshopper.
(A project based on LLMs. It’s part of a R&D project of an architect lab and a designer lab)

The deal is to have it able to create, modify, connect, cluster, group, … components.
On this journey, I’m currently struggling to find a way to add or delete inputs/outputs to the component with an interactive input/output manager kind of interface (like multiplication, addition, scripts, area …)

This issue also appears in the identification of such components. I’m currently creating a JSON doc (to feed the LLM) of the vanilla components based on GHX files of canvas filled with components (allows me to automatically get the name, description, inputs and outputs of components). But those files do not have the information about which is the inputs or the outputs that can be modified (I can identify this kind of component, but there merely is a description of the current state of the inputs/outputs, nothing more).
For this second issue, if no easy solution can be found, I’ll simply do it by hand (shouldn’t be too much of this kind of component)

All components with editable parameters implement IGH_VariableParameterComponent interface.

To check which paramaters can be added and removed, use the CanInsertParameter and CanRemoveParameter methods.