How Ian Direach got the Blue Falcon

"How Ian Direach got the Blue Falcon" is a Scottish fairy tale, collected by John Francis Campbell in "Popular Tales of the West Highlands". He recorded it from a quarryman in Knockderry, Roseneath, named Angus Campbell.
Andrew Lang included it in "The Orange Fairy Book".
Synopsis.
A king and a queen had a son, Ian. When Ian was almost grown to a man, his mother died, and his father remarried. One day Ian went hunting and shot at a blue falcon, knocking off a feather. His stepmother cursed him until he found her the falcon. He cursed her to stand with one foot on the great hall and the other on the castle, and always face the wind, until he returned, and left.
He met with Gille Mairtean the fox, who tells him that the blue falcon is kept by the Giant of the Five Heads, and the Five Necks, and the Five Humps, and to seek service there tending animals. If he, above all, treats the birds kindly, the giant will let him care for the blue falcon, and then he can steal it, if he does not let any of its feathers touch anything in the house. In time the giant trusted him, but the falcon started by the doorpost, and the feather touching the post made it scream and brought back the giant. The giant tells him he may have the falcon if he brings him the White Sword of Light, owned by the Big Women of Dhiurradh.
Gille Mairtean turned himself into a boat and carried Ian to the island of Dhiurradh, and told him to seek service there, polishing gold and silver, which will let him, in time, steal the sword, but he must not let its sheath touch anything within the house. This succeeded until the tip of the sheath touched the doorpost, and it shrieked. The Big Women told him he may have the sword if he brings them the bay colt of the King of Erin.
Gille Mairtean turned himself into a boat, and carried Ian to the castle, where he served in the stable until he had a chance to steal the colt, which swished its tail against the door, and the king told him he must bring him the daughter of the king of the Franks.
Gille Mairtean turned himself into a boat and carried him to France. The boat ran himself into the cleft of a rock, and sent Ian to say he had been shipwrecked. The royal court came down to see the boat, and music came out of it. The princess said she must see the harp that played such music, and Ian and Gille Mairtean carried her off. She was angry, he explained why he needed to carry her off, and she said she would rather marry him.
They returned to the king, and Gille turned himself into a beautiful woman, and had Ian give him instead of the princess. After Ian received the bay colt, Gille bit the king, knocking him unconscious, and escaped, and they returned to the Big Women. Gille turned himself into a bay colt, and after Ian received the sword, threw it at all the Big Women, killing them. They returned to the giant, and Gille turned himself into a sword and, once Ian had received the blue falcon, cut off the giant's heads.
Gille warned Ian how to carry what he had brought back to the castle, to prevent his stepmother turning him into a bundle of sticks. He obeyed, and his stepmother was turned into a bundle of sticks herself. So Ian burned her, married the princess, and lived ever afterwards in friendship with Gille Mairtean the fox.
Analysis.
Folklorist Patrick Kennedy stated, on his notes to the Irish tale "The Greek Princess and the Young Gardener", that the quest for the bird with the help of an animal "occurs in "Mac Iain Direach" ('Son of John the Upright')".