Is this the best Terry Ryan could do?
Definitely Yes

Castillo's value has been apparent since Friday, when Tadahito Iguchi and Kenny Lofton were each traded for an A-ball prospect. You could argue that Ryan got twice as much as he probably should have.
Yeah, but I looked at these guys stats, and don’t they suck?
Ask Again Later
Butera is a 23-year-old in AA who was promoted earlier this year after having some success at High-A ball. He’s taking it on the chin in his exposure there, hitting just .195 so far in 113 at-bats. Of more concern is his history, because he hasn't hit for average in his two-year professional career.
Martin is hitting .287, but he's not hitting for power, and he's also 23, and he's doing so in High A ball. Again, he doesn't profile as anything close to a top prospect.
But as someone who has criticized Ryan's trades in the past, I gotta say, you do NOT pass judgement on these things right away. I ripped Ryan several years ago for giving away Brian Buchanan for a utility infielder in A-Ball. That ended up being Jason Bartlett. I wondered aloud if they couldn't get something more substantial for JC Romero than a middle infielder way down on the Angels' organizational depth chart. That ended up being Alexi Casilla. And I wondered why they bothered to include a fragile left-hander in the AJ Pierzynski trade, who was obviously Francisco Liriano.
After you wear enough egg, you learn. When Ryan makes a trade that he isn't forced to make, and he gets guys low in the minors that look suspect, keep your mouth shut and give him the benefit of the doubt. He's certainly earned it.
Does This Mean They're Giving Up On The Season?
Don't Count On It
Castillo certainly was valuable in his role. His defense was overrated due to his errorless streak, but he did two things well - got on base and raised his level of play when he became interested. But there are a couple things to consider:
1. Ryan may be trying to walk a fine line. The team isn't good enough, and the players available on the trade market aren't impactful enough, to convince him that any deal is necessarily going to be a difference maker. By moving Castillo, he leverages an asset that he feels he can replace with one of several different pieces - Nick Punto, Alexi Casilla, Brian Buscher or Matt Tolbert. He also helps the team in the future (albeit the distant future) without sacrificing much for the present.
Personally, I don't see a suitable substitute on the roster, which brings us to the next point....
2. The other shoe may soon drop. Why would trading away Castillo be necessary for a different trade? Well, he may see another available second baseman that is a better fit for the Twins, providing more power or better at-bats, and at a smaller price tag. I certainly do. Or (and I think this is more likely) he felt like he needed to free up some payroll dollars to pay someone a little more expensive that could have a greater impact.
You'll recall that Ryan went this route in 2001, trying to shuffle players to upgrade his pitching staff, bullpen and right fielder, but failed after completing 2/3 of the trades. Rumor had it that the last piece - trading for Shannon Stewart - fell through because the Blue Jays delayed until they just ran out of time. If this is the plan, let's hope Ryan has found a more competent trading partner than Gord Ash.
So is this a good trade or not?
Outlook Not So Good
It doesn't do anything to improve this this year, and it doesn't do anything to improve next year, and those should be issues 1A and 1B on any list of priorities. The franchise seemingly hasn't made up it's mind, with less than 24 hours to go. Or at least, if they have, this trade doesn't indicate it.
If they're going for it this year, then announce that, and commit moving a prospect for an impact player. If they're looking to the future, they should be finding out if they have a realistic chance of keeping Torii Hunter next year, and that means entering into negotiations quickly to find out if Hunter and the Twins are in the same ballpark. If not, they need to shop him in a hurry.
They've done neither with this trade. Unless it is followed by another, it feels like a wasted opportunity, and will likely be interpreted as a white flag by the fans and the team. And waving a white flag with 60 games left to go should get a team more than a couple of minor league sleepers.