Protein that can both mediate the addition of adenosine 5'-monophosphate (AMP) to specific residues of target proteins (AMPylation), and the removal of the same modification from target proteins (de-AMPylation), depending on the context. The side chain of Glu-236 determines which of the two opposing activities (AMPylase or de-AMPylase) will take place. Acts as a key regulator of the unfolded protein response (UPR) by mediating AMPylation or de-AMPylation of Hsc70-3/BiP. In unstressed cells, acts as an adenylyltransferase by mediating AMPylation of Hsc70-3/BiP at 'Thr-518', thereby inactivating it. In response to endoplasmic reticulum stress, acts as a phosphodiesterase by mediating removal of ATP (de-AMPylation) from Hsc70-3/BiP at 'Thr-518', leading to restore HSPA5/BiP activity 