Humans are not doing well at fighting against the mice. They are small, smart and deadly. Humans will have access to medieval tech, swords, bows and magic.
The magic system would rank the spells as
Anti-unit [a basic fireball would kill a normal commoner right?]
Anti-army [something like blizzard which can affect up to a few hundred people]
Anti-fortress, Anti-planet will be excluded since humans won't handle this kind of power well enough to avoid blowing up the planet in a day.
Magicians that can use anti-army class spells would only add to about slightly above a hundred across the world. Not like they would help much when mice are quite literally everywhere. The spells can be complex but trying to do something like targeting all mice with instakill spells is impossible, spells require visual confirmation[bad news if you are blind]
For the sakes of allowing a answer, we are going to assume that the mice are out to destroy the kingdom of Joe. This kingdom is a monarchy, ruled by King Joe and his council of greedy nobles. The kingdom capital has a geocentric pattern divided into twelve rings and a circle in the middle.
The royalty would live in the middle followed by richer influential nobles followed by the less rich and influential until the last 9 rings which are occupied by commoners. Each ring or sector is surrounded by a stone wall with steel gates at each Cardinal direction (NW, NE, SE and SW included, so there are 8 gates at each circular wall. So in order to get to the center, one must pass through the 13 walls surrounding it[or climb past]. Guards patrol the rampart regularly and security tightens as one gets further in. To get from for example the 12th to the 11th gate, one must have a mark on your identity pass from the 12th gate [so people who sneak in illegally have to continue sneaking illegally]. The city also has a underground sewer that lead from the center to the last ring [they are connected]. Size of the capital I'm not really sure, each ring should be the about the same walkable distance from each other. Farmland is mostly on the last ring and outside the protection of the walls [the kingdoms station serfs and soldiers to guard those]
the humans know of the intelligent mice existence
the humans have experienced attacks carried out by them before about a week before
the humans do have beast tamers that can hunt them down but they will need a 3 days for all of them to get to the capital from the other towns and villages so there are about 50 of them currently in the capital and another 200 coming in 3 days. [The beasts are monsters that are tamed, for the sake of simplicity, they will all be dog-wolf types where their heads would reach a adult males chest level]
the population comprises of about 400,000 commoners, 4700 nobles, and about 100,000 soldiers [commanders included] [nobles are usually the ones in higher places] Humans have about 20 wizards capable of anti-army and a magic corps about 1000 wizards strong. [Can't believe I forgot that T_T]and 13 members of royalty. Totaling to about 505,733 people who live in the city
there are currently about 100,000 mice in the capital, they will be the only forces to defend against. The total population of mice at the end is not my concern, they could be all dead for all I know [also if u want a challenge, I REPEAT, A CHALLENGE , the mice can use anti-unit spells based off chemical magic [Acid spear, poison needle] and to a smaller extent as their affinity to other elemental magic [petite fire ball] is lower. All of them can use magic but can only manage off about 3 shots before getting mana exhaustion]
the mice main targets are royalty and nobles, they have no plans to kill the commoners but have no qualms for collateral damage or intentional slaughter of them. Also for all purposes, I'm gonna give them claws and teeth that can break iron and scratch through them. [Doesn't make sense for them to only be able to poison and not use their own skills right?]
for a successful defense against the mice attack, less than 20% of the total population of the humans can die [I don't want something like the nobles going all like "SACRIFICE THE PLEBEIANS"]
the defense plan must be able to prevent future attacks
this is under the full support of the royal family, so consider what you can do when you have a innumerable amount of metal, wood and other resources to use [medieval stuff of course, can't have you building automatic mice terminators can I]
the other question I asked would tell you what the mice can do. [ITS AT THE TOP]