Five days in Tokyo is the sweet spot. Enough time to cover the major sights without sprint-walking between them, and enough slack to sit in a park, queue for ramen, or follow a backstreet that looks interesting. This itinerary groups the city by neighbourhood so you're not zig-zagging on trains all day. Expect 8-12 km of walking per day, which sounds like a lot but doesn't feel like it when there's something to eat or photograph every hundred metres.
A Suica or Pasmo IC card (buy at any station, load with ¥2,000-3,000 to start) covers all trains, buses, and convenience store purchases. The JR Yamanote line loops around central Tokyo and connects almost everything on this itinerary. Google Maps is reliable for train routing.