inspect_dom
Inspect full HTML or find contextual snippets around a search query in a Chrome tab. Use to examine page structure, locate elements by text, or confirm 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 |
|---|---|---|---|
| after | No | Characters to include after the match. Constraints: non-negative integer. Interactions: only applies if 'query' provided. Defaults to: 200. | |
| 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). | |
| before | No | Characters to include before the match. Constraints: non-negative integer. Interactions: only applies if 'query' provided. Defaults to: 200. |