I read this book about 10 years ago in either late elementary/middle school. It was a light fantasy novel (perhaps YA) and I'll try to summarize all the main points I remember.
- The main character was a girl named Petra and she had gray eyes (which was important to the book) and powers related to metal/machinery. She has a pet metal spider who drinks oil.
- Her father left home a long time ago to help and never came back. Around the start of the story I believe she receives his eyes from palace messengers
- She meets a boy who is Romani and he teaches her to throw daggers, which she's uncannily good at
- This same boy is extremely talented at pickpocketing because he has a power that gives him "invisible fingers" and a small backstory is explained for this that goes thousands of years back (I think it had something to do with this man who had his fingers cut off, but I can't be sure)
- This girl goes to the palace to work for the prince in disguise as a maid (the aforementioned boy works there as a stableboy and so does his sister, but as a maid if I remember correctly)
- Petra gets tossed around a bunch and eventually ends up working for this woman named Iris(?) who works with dyes and almost no one likes her and I believe she's also very ugly. They come up with a new color for the arrogant prince in this story
- The last two vague details I remember are something with a clock tower and also a metal beating heart that hurts to touch