A focus of trade speculation, Hamels didn't allow a hit until Kevin Pillar reached on an infield single leading off the fifth. Hamels picked off Pillar, Dalton Pompey tripled to left-centre field and Hamels struck out Jose Reyes on three pitches.
Hamels, a four-time All-Star, struck out four and walked three.
With one exhibition start remaining before Philadelphia's opener against Boston on April 6, the lefty said his primary objective will be to lessen his pitch count early for a longer outing.
"I would prefer to go out six or seven innings," Hamels said. "I threw a lot of pitches in the first two innings today, so I think that's kind of the focus is to try to get ahead of hitters early and then be able to get them out in three or four pitches or less just so I can go a lot longer and stretch out my innings."
Steve Tolleson hit a grand slam off Ken Giles in the eighth.
Blue Jays starter Aaron Sanchez gave up one run, two hits and one walk in 5 1-3 innings.
Edwin Encarnacion returned to Toronto's lineup at designated hitter after missing 16 games with back inflammation. He walked twice and reached on a fielder's choice.
Toronto optioned reliever Steve Delabar to Triple-A Buffalo.
"I'm not happy with the move, neither should I be, because I've had a pretty good spring so far," Delabar said. "I thought I was going to be a big part of it to begin with."
The 31-year-old was an All-Star in 2013, but struggled to replicate that success last season; he had a 4.91 ERA with the Blue Jays and also spent time at Triple-A. He gave up three runs in seven outings during spring training and had been scheduled to pitch against Philadelphia before the move.
Manager John Gibbons said he understands the frustration.
"We wanted him to be on the team. It's just not the way we're putting the team together right now," he said. "That could change. That's the business side of it."
Blue Jays: Marcus Stroman, who is out for the season after tearing the anterior cruciate ligament in his left knee on March 10, sat behind home plate in the stands to watch Sanchez's start.
Stroman, who wore a black hat and T-Shirt, tweeted, "Sat in the stands to watch my brother @A_Sanch41 throw today. He's more than ready to take the ball every fifth day and dominate! #StroChez"
Phillies: 3B Cody Asche was a late scratch from the lineup after feeling tightness in his back while stretching during morning warmups. He was replaced by Andres Blanco, who was hitless in three at-bats. ... LHP Mario Hollands (strained common flexor tendon) is leaning toward having surgery, but will seek a second opinion from noted orthopedic surgeon James Andrews before making a final decision. ... SS J.P. Crawford (strained left oblique) likely will be sidelined four to six weeks.
Blue Jays: LHP Brett Cecil (rotator cuff inflammation) made his first appearance of spring training, striking out one in one inning. He is scheduled to pitch again on Sunday against a Baltimore split squad and Monday at Houston. ... Gibbons said OF Michael Saunders (torn meniscus) and INF Maicer Izturis (groin strain) will both start the season on the disabled list.
Phillies: Former LSU star Aaron Nola, the seventh overall pick in last year's amateur draft, will make his first appearance against the Yankees on Friday night in Clearwater.
Blue Jays: Drew Hutchison is scheduled to start on Friday against the Tigers in Dunedin. The righty has allowed two runs in 10 innings.