The Three Dogs

Andrew Lang included it in The Green Fairy Book, listing his source as the Brothers Grimm.

[2] A dying peasant told his son and daughter that he had only his house and three sheep to leave them; they could divide them as they wished, but must not quarrel.

He met a stranger who offered to trade three dogs for his sheep: Salt, which would bring him food; Pepper, who would tear attackers to pieces; Mustard, which could break iron or steel with its teeth.

The brother agreed and once the trade was done, asked Salt for food; it instantly gave him some.

Salt went to the castle, and the princess recognized it and gave it food in a royal handkerchief.

She told her father the truth, the king sent a servant to follow the dog, and the man produced the dragon's teeth to prove his story.