To start, here is what Merriam-Webster says about less:
adjective
comparative of LITTLE ENTRY 1 [not big]
1 : constituting a more limited number or amount
// less than three
// less than half done
2 : of lower rank, degree, or importance
// no less a person than the president himself
3 a : of reduced size, extent, or degree
b : more limited in quantity
// in less time
adverb
comparative of LITTLE ENTRY 2 [not much]
: to a lesser extent or degree
less and less
: to a progressively smaller size or extent
less than
: by no means : not at all
// less than honest in his replies
This is less than satisfying. (No pun intended.) I can detect enough of a pattern between these two uses that I'd probably be able to guess sufficiently well in most cases—but I'd still like something a little more concrete than what is said here.
Things get a bit more interesting if I look at other dictionaries.
Oxford Dictionaries primarily provides only an adverbial definition of less. It does indicate an archaic adjectival definition of less (Of lower rank or importance: 'James the Less'), but that doesn't concern the distinction here.
Also, if I look at Collins, it has sections for "less in British" and "less in American." The British section only lists it as an adverb—and indicates that UK English makes use of only a single sense of little. Meanwhile, the American section lists it as both an adjective and an adverb, with each of those making use of a different sense of little.
Similarly, Cambridge Dictionary provides an entry for its function as an adjective—but only in its section on American English. Its main entry doesn't include it as an adjective anywhere.
This tells me that in UK English less is never an adjective. It's only in US English that it is sometimes used as an adjective.
In conclusion, if this was a test based on UK English, then it makes sense that the answer would indicate it is an adverb. (Because there seems to be no concept of less as an adjective in UK English.)
If we go by Merriam-Webster, the interpretation is less clear. It seems at least somewhat open to interpretation. If forced to guess, I'd call it an adjective in the sentence in question.