Repository navigation
Enhancement: Reduce repeated metadata overhead in MCP delta snapshots #2714
vibhanshu-mishra
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
While testing agent-browser 0.43.0 through its MCP interface, I observed that delta snapshots can include substantial metadata overhead, particularly on the first delta call.
This is an optimization suggestion rather than a confirmed correctness bug.
Reproduction
Using a local fixture page containing approximately 80 links:
Open the page with agent-browser.
Call
agent_browser_snapshotwith{"interactive": true, "includeUrls": true}.Call the same tool with
{"interactive": true, "includeUrls": true, "delta": true}.Repeat the delta snapshot without modifying the page.
Observed results
Operation | Approximate response size -- | -- Normal snapshot | 5.3 KB First delta snapshot | 13.2 KB Subsequent unchanged delta snapshot | 668 bytesThe initial delta response includes a
refsmap of approximately 3.9 KB, containing role/name information that also appears in the accessibility tree.Delta responses also include lifecycle metadata of approximately 600 characters, even when the page has not changed.
Potential improvement
Would it be possible to reduce repeated metadata overhead in delta snapshots while preserving compatibility with clients that rely on element references and lifecycle information?
Potential approaches might include:
Avoiding redundant role/name duplication where the tree already contains equivalent information.
Providing an opt-in compact metadata mode.
Returning lifecycle metadata only when its state changes, where compatible with the MCP contract.
Keeping stable element references available without reproducing unnecessary descriptive information.
Expected benefit
Smaller repeated snapshot observations could reduce model-context usage for agents performing multi-step browser research.
Environment
agent-browser version: 0.43.0
Interface: MCP
Test environment: Local fixture website
No external provider calls
I'm happy to provide the fixture and a minimal reproduction if useful.
The goal is to understand whether the observed overhead is intentional and whether a more compact response format would be feasible without breaking existing consumers.
All reactions