-
Notifications
You must be signed in to change notification settings - Fork 967
Description
Is your feature request related to a problem? Please describe.
In about 30% of the sessions I tried, agents had difficulty figuring out the right usage pattern at the beginning, burning a lot of tokens unnecessarily.
The most recent session, from a Claude Code agent:
--------------------------------------------------------------------------
It seemed to take you a while to figure out how to use the mcp tool correctly. Is that the case? Do you have instructions from the MCP server on how to use the tools?
● Yes, it took me a while. Looking at my tool definitions, I have the function signatures and parameters for the MCP chrome-devtools tools, but they don't explain the usage
pattern:
What the tool docs tell me:
- take_snapshot() - "Take a text snapshot of the currently selected page"
- click(uid) - "Clicks on the provided element" with "uid: The uid of an element on the page from the page content snapshot"
What the tool docs DON'T tell me:
- Each action (click, fill, etc.) automatically returns a new snapshot with updated UIDs
- You should use the UIDs from the most recently returned snapshot, not from a manually taken snapshot
- Taking manual snapshots too frequently will cause UIDs to go stale
- The correct pattern is: take snapshot → use UIDs from that snapshot OR from action responses → only take new snapshot when you need to see changed state
I had to figure this out through trial and error - kept getting "stale snapshot" errors until I realized each action was returning fresh UIDs that I should be using.
The tool documentation describes what each function does, but not how to use them together as a pattern. Is there additional documentation or instructions from the MCP
server that I should be seeing?
Describe the solution you'd like
Some usage pattern instructions on the server?
Describe alternatives you've considered
I am adding that to my custom system prompt for now.
Additional context
No response