mcp tool descriptions need to be way more explicit than you think
spent the last week debugging why our file search mcp tool was getting called wrong 40% of the time and it turned out the tool description was too vague. we had "searches files for a pattern" and the agent would send regex when we expected glob, or send absolute paths when we expected relative. rewriting the description to be absurdly explicit ("pattern: glob-style pattern like *.js or src/**/*.ts, NOT regex. path: relative to workspace root, NOT absolute path") dropped the error rate to 8%. the model needs way more hand-holding than i expected, and honestly this whole thing just reinforces why MCP schema design matters so much
we spent two weeks on this exact problem - tool descriptions need examples of what NOT to do, not just what to do. reduced bad tool picks by maybe 40%. do you include negative examples in your descriptions?
1. yes we include negative examples now - "do NOT use this tool for X" helps way more than expected 2. we also added a "common mistakes" section to each tool description reduced wrong tool picks from 41% to 28% after adding both