Creating JQL for the left side of an operator

I was able to create a custom JQL function that is usable like so:

Issue in someFunction(“param”)

The function is usable to the right of the “in” operator. What I would like to do is create a JQL keyword usable on the left, like so:

myKeywork in (“something”, “something else”)

For a given issue, I would fetch the information indicated by “myKeyword” in the JQL in my plugin’s database (with the key of the issue, it would be easily fetchable). I think I would be able to do it if I add a customfield to the issue, but would rather not do that. I would prefer a piece of code to be executed, with an issue in parameter, and return some data (a string).

It could be a function behaving like a field. Maybe something like the “field” Text, which is not a field, but searches in several fields,

Also, I made some function that return a list of issues (like I said at the beginning), usable like so:

Issue in someFunction(“param”)

It is possible to receive the isue that is being analysed in the parameters of the function? In JQL, you can write:

Project in ("someKey) AND Issue in someFunction(“param”)

I would like to be able to receive the Project of each issue being compared to my function in parameter. I don’t know if that requirement is clear, or if it possible…