I created this document on some of the problems with Cline and Claude code etc.
I used stats to design my tools to limit token use and drop failed edits quite a bit. might be worth a read. There is also sample working code for examples of these ideas.
https://github.com/professor-jonny/pulsar-edit-mcp-server/bl...