inspect_dom
Retrieve full HTML documents or contextual snippets from active Chrome tabs to inspect page structure, find elements by text, or verify rendering without side effects.
Instructions
Retrieves the complete HTML document or a contextual snippet around a search query. Side effects: none (read-only). Prerequisites: requires an active Chrome tab with loaded DOM. Returns: full HTML or snippet with context markers. Use this to inspect page structure, find elements by text, or verify rendering. Alternatives: 'evaluate_js' for complex DOM queries, 'capture_screenshot' for visual verification.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Text pattern to search for in the DOM (case-sensitive). Constraints: any string. Interactions: when provided, returns context snippet instead of full HTML. Defaults to: None (returns full HTML if omitted). | |
| after | No | Characters to include after the match. Constraints: non-negative integer. Interactions: only applies if 'query' provided. Defaults to: 200. | |
| before | No | Characters to include before the match. Constraints: non-negative integer. Interactions: only applies if 'query' provided. Defaults to: 200. |