A service station worker has been taken to hospital after he was slashed with a sword during an armed robbery in Sydney's north-west on Tuesday night.

The 42-year-old man was working at a service station on Solander Drive in Kings Langley when three men entered with their faces covered.

The men, armed with a pistol, a shortened firearm and a sword, threatened the service station worker and demanded cash and cigarettes, police said.

While the worker was handing the men the cash drawer, the man with the sword allegedly lashed out with the weapon and partially severed the worker's thumb.

The trio then allegedly fled with the money, and were last seen running south on Reardon Avenue.