I'm looking to record my guitar but I'm worried about the room that I'm recording in. There is a lot of echo.

So I was thinking, what if I were to build like a box and put acoustic foam on the inside of it and put my 6505 combo inside of it along with the my mic. Would I get a nice clear sound from it.

Is this a stupid idea? Will it even work???

I can't record in any other room in my house and treating the whole room with acoutic foam or anything else is not an option.
unless that foam you've got has magical powers and can absorb all of the reflections, you're going to end up with a very muddy, very gross sound.

put your amp on some carpet, make sure it's away from the walls, and close mic it. if you've got a walk-in closet that's semi-large, you can try putting it in there -- the clothes will help to dampen some of the freqs. if it's still too bad, DI or record at a friend's place.
well, putting the amp in a box for recording isn't something new, randall makes something similar with the hole for the mic. dont remember the name but is someone here remember maybe you can go look at them and build something like that.
Peavey Bandit 112
Washburn Chicago series :SD Invader at bridge ,GFS Lil Killer on neck
Bc Rich Warlock :GFS Vintage59 on neck ,Crunchy rails on bridge
Epiphone SG :Tusq Nut, GFS Crunchy Pat on neck, bc rich pickup on bridge
lots of cheap pedals