I would like to identify a short story involving a Medici prince consulting with Leonardo DaVinci about an outbreak of plague; elderly DaVinci idly conceives of a water filter & several other inventions; builds a paper puppet for the prince's sick son. I originally read this in a collection of other Sci-Fiction and fantasy stories.
I believe you are conflating two stories about Leonardo da Vinci, "The Ape and the Mystery" and "The Dancing Doll", both by Gerald Kersh; they appeared together in Kersh's 1962 paperback collection Men Without Bones.
The water filter is from "The Ape and the Mystery":
While the young Duke had been talking, the aged Leonardo had been drawing diagrams with a silver point on a yellow tablet. At last the Duke said: "You have not been listening to me."
"I beg your pardon, Magnificence. There was no need. Everything is clear. Your water down there near Abruzzi is turbid and full of bad things, evil humors. Cleanse it, and this flux will pass."
"What," said the Duke, "I must wash my water?"
"You must wash your water," said Leonardo.
The young Duke stared at him, but he continued still drawing on his tablet: "You must wash your water. Tell your coopers to make a barrel, a vast barrel, as large as this hall, and as high. Now in this barrel you must lay first, clean sand to the height of a man. Then charcoal to the height of a man. Above this, to the height of a man, gravel. Then, to the top, small stones. Now down here, where the sand is, there must be a pipe. The bottom of this great cask will incline at a certain angle. The pipe will be about as large as a man's arm, but a plate of copper, or brass, suitably perforated, will cover the end embedded in the sand and will be further protected by a perforated case so that it may be withdrawn, if choked with sand, and replaced without considerable loss of pure water."
The paper puppet is from "The Dancing Doll":
"What are you cutting out there?" the Duke asked.
"Oh, a head, torso, and limbs . . . then, I will paint them, and make a little marionette. The limbs, as you will see, will be divided in three. Each to each, I will join them with a tiny knotted string. Then, running my string down the back, and connecting it with the knots at the neck, shoulders, and hips, your son wil have a little man who will dance on a thread . . ."
"I don't quite see that," said the Duke.
"You will, Magnifico, in ten minutes," said Leonardo, mixing colors. "The boy needs the wherewithal to occupy his little mind. Well, well, he shall have a soldier in red and blue, who dances. . . . Patience, Magnifico—it will be done in no time at all, no time at all."