Solved
TestComplete supports adding variables to a project/project suite programmatically:
https://support.smartbear.com/testcomplete/docs/testing-with/variables/collections/project-and-project-suite/working-in-scripts.html
And in Keyword tests:
https://support.smartbear.com/testcomplete/docs/keyword-testing/variables.html#Scripts