Saw your HN thread about �rowser_snapshot returning the full accessibility tree on every call:
https://news.ycombinator.com/item?id=45764043
Built a delta snapshot filter that solves it — caches the accessibility tree on the first call and only returns changed nodes on subsequent calls. Typical reduction from ~800+ lines to ~20-50 lines.
Open source solution:
https://github.com/zyphonOS/AOSI/blob/main/tools/playwright-mcp-fix/pwmcp_delta.py
Includes three strategies:
- A) Agent prompt to minimize �rowser_snapshot calls
- B) Delta proxy (caches tree + diffs each call)
- C) Shell filter via jq on the raw snapshot
Happy to discuss or help integrate.
— Greg / AOSI
Saw your HN thread about �rowser_snapshot returning the full accessibility tree on every call:
https://news.ycombinator.com/item?id=45764043
Built a delta snapshot filter that solves it — caches the accessibility tree on the first call and only returns changed nodes on subsequent calls. Typical reduction from ~800+ lines to ~20-50 lines.
Open source solution:
https://github.com/zyphonOS/AOSI/blob/main/tools/playwright-mcp-fix/pwmcp_delta.py
Includes three strategies:
Happy to discuss or help integrate.
— Greg / AOSI