Is there any way that my script can retrieve metadata values that are declared in its own header? I don't see anything promising in the API, except perhaps GM_getValue(). That would of course involve a special name syntax. I have tried, for example: GM_getValue("@name").
The motivation here is to avoid redundant specification.
If GM metadata is not directly accessible, perhaps there's a way to read the body of the script itself. It's certainly in memory somewhere, and it wouldn't be too awfully hard to parse for "// @". (That may be necessary in my case any way, since the value I'm really interested in is @version, which is an extended value read by userscripts.org.)