Rene Descartes' famous argument, in fact, is not much use with the brain-in-a-jar scenario.

After envisioning all possible deceptions and doubts, Descartes concludes that the one thing he can be sure of is that he is a 'thinking thing'.

Hey! Guess what? A brain-in-a-jar is a 'thinking thing' too!

You have to look elsewhere (maybe Kant, maybe Wittgenstein, for example) for some decent arguments against this brand of solipsism - though Descartes did go on to develop his 'Cogito' argument in order to make plausible the reality of the external world, his arguments resulted in Substance Dualism, which is hardly thought credible by most modern philosophers. An excellent discussion is available under "Undetectable Illusion."

One could easily imagine that an artificially conscious robot philosopher might ponder a similar 'chip-on-a-test-bench' problem, and in fact such a scenario was used by one of the crew in the Sci-Fi comedy film Dark Star, in order to convince an intelligent and willful bomb that it shouldn't trust its sensory data, and therefore hasn't necessarily received the order to detonate.

Quite sensibly, after some consideration, the bomb decides this attempt to "teach it phenomenology" is just more untrustworthy sensory input. "You are bad data", it says, and happily blows them all up.