Try re-reading it as "...when appropriate." and see if it makes more sense to you like that.
In many contexts such as this, the phrase "...for X do Y as appropriate..." indicates that doing Y may or may not be appropriate for every X, and so Y should only be done on a case-by-case basis.
Similar phrasings include "as needed" or "as necessary".
As an example, let's imagine an ice-cream shop!
As an ice-cream shop employee, you should take a new cone and fill it with the ice-cream of the customer's choice. Then you should add toppings as requested.
Why do the instructions say "as requested"? Because not all customers want toppings! If the instructions only said "... add toppings." then following the instructions (too literally) would mean adding toppings for every customer.
A better wording in this example might be "Then you should add any requested toppings." but sometimes the "... as required" construction is just more appropriate.
Back to your example:
[A WSGI-compliant server or gateway] should [document what variables it provides], [along with their definitions as appropriate].
Breaking the sentence into those main pieces, we can basically understand that last chunk to mean "... and document the definitions for those variables as appropriate".
I cannot think of any reason why documentation for the definition of a variable would be inappropriate... but perhaps this choice of phrasing is being used more in a business-sense than a technical-sense so as to allow more wiggle-room if they ever get sued and want to argue that something wasn't strictly required.