Hi Jonathan,
The only stamps you have access to as part of workflow are those that are included in the tasks (though the ability to use stamps independently of workflow tasks is worth voting on
here in uservoice), so your only option would be to include a field in your task for your variable, make it readonly and populate it with your variable, and then check off the "Display on document" setting for that field.
You can also use the API for placing stamps or annotations on documents automatically so if you went that route you could pass whatever variable you like.