@mcp-b/smart-dom-reader is a DOM extraction library for agent workflows. It turns a live document into structured data, interactive element maps, and stable selectors while keeping token usage low.
When to use this package
- You are building DOM-aware tools for agents or browser automation.
- You need structured page summaries or ranked selectors.
- You want DOM extraction without bringing in a full MCP runtime.
When not to use this package
- You only need to expose browser-page tools. Use the runtime packages instead.
Where it sits in the package graph
This package sits in the tooling layer and can be used standalone.First step
Choose whether you need one-shot extraction or staged extraction. The reference page documents both approaches, selector outputs, and the optional MCP integration.Related pages
Reference
Extraction APIs, selector ranking, and result shapes.
Chrome DevTools MCP overview
Tooling path when you want DevTools-based automation instead.
Tool design
Design guidance for tools that expose DOM-derived capabilities.
