Add support for `context` and `res` param types

/cc @bajtos