This issue primarily depends on the capabilities of the debugger you are using, as dap-mode itself is just a client for the underlying debugger and does not perform the debugging itself. It essentially forwards the configuration template you provide to the debugger with minimal preprocessing.
If you are using debugpy (commonly used for Python), you should consult its documentation to verify which parameters and values are supported: debugpy Launch/Attach Settings.
Unfortunately, dap-mode does not evaluate or dynamically process templates before sending them to the debugger. This is why using a lambda or function call inside the :args field does not work. The :args key in the template is expected to be a static list of strings.
As for implementing dynamic prompts (e.g., asking the user for input when starting the debugging session), this feature is currently not supported in dap-mode. It would require a modification to the dap-register-debug-template function to allow, for example a third parameter or a flag to indicate that the template needs to be evaluated dynamically before sending it to the debugger.
If this feature is essential for your workflow, you could consider submitting a feature request or pull request to the dap-mode repository to add support for dynamically evaluated templates. For now, a workaround would be to predefine multiple templates for different argument sets or to manually edit the args field in your template before launching the debugger.