Calling C with a tuple where I write the C to parse the tuple

From Julia, I want to call a C program and pass a tuple.
Tuple is variable length.
Tuple is actually written by a third party.
The domain is a GIMP plugin.
A third party author will write the Julia, calling GIMP procedures ( in the so-called GIMP PDB.)
I am writing the C, it is not an existing library, it will be glue to GIMP.
So I think I can use the jl_ functions to do introspection of the tuple,
iterating over it, getting the values, determining their types, and marshalling them into values for GIMP.

Does that sound doable?

Is there an example or similar project?

I am having trouble with declaring the types for such a function to a ccall?

It might be similar to what the GIMP ScriptFu plugin does: access TinyScheme internal data structures.