The Tangerines are facing crunch time as they chase a top-six slot with games against Saints tomorrow night at McDiarmid Park before hosting Aberdeen at Tannadice this weekend.
McNamara knows the importance of securing a top-half finish for the Scottish Cup semi-finalists so will not mind if they win ugly on this occasion.
McNamara said: "We always try to play good football.
"But when it gets down to this stage of the season it can be more about the result than the performance at the end of the day.
"I know the players can dig deep to win even if they're not at their best.
"That's a side of their game they've shown since I came in so they may have to do that again.
"St Johnstone are a big, strong side so we will obviously have to match them in that respect.
"It's going to be a very hard game but we'll be ready for it and hopefully come away with a positive result."