I want to have a magic word IS_APPROVED which returns is-approved if a Mediawiki page version is approved and returns  if the page version is not approved.  The page is approved via the ApprovedRevs extension which simply adds a pair (pageid,versionid) to a table in the MySQL database to indicate the version approval.Does such a magic word already exist?
How to find out if a magic word for Mediawiki already exists?
mediawiki
api.php?action=query&meta=siteinfo&siprop=magicwords will give you the list of magic words available on a wiki (documentation, English Wikipedia example). As for figuring out if anyone has ever written an extension providing a magic word for a certain function, well, Google is your friend... As the manual on variables explains, MagicWordwgVariableIDs is a good search keyword as any extension providing variables must subscribe to that hook.