LSP servers may send suggestions for fixing the code, things like "Add missing import <foo>", "Sort the list", etc. They can be "applied" by executing (lsp-execute-code-action).
When (lsp-execute-code-action) is invoked interactively it either asks which action to apply or applies if there's just one.
For example, given this C code with clangd server, putting caret over puts and executing M-x lsp-execute-code-action would add #include <stdio.h> line.
int main() {puts("hello");} But how do I invoke (lsp-execute-code-action) programmatically and pass it the action to execute? For example, I might want to bind a key to certain action I frequently use, which would require wrapping (lsp-execute-code-action) with some explicit argument.
The current function documentation is unhelpful, and the code uses a lot of DSL, so I couldn't figure out that offhand.