take_snapshot
Capture DOM snapshots with stable UIDs. Scope by CSS selector, limit lines/depth, or save the full tree to a file.
Instructions
Capture DOM snapshot with stable UIDs. Retake after navigation. Output caps at maxLines (default 100); scope with selector or dump the full tree with saveTo.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| saveTo | No | Save the complete snapshot text to a file (ignores maxLines) instead of returning it inline. Pass a file path, an existing directory (generated file inside), or true (generated file under ~/.firefox-devtools-mcp/output/). Relative paths resolve against the current working directory. | |
| preview | No | Number of characters of the saved output to return inline as a preview when saveTo is used. Omit for no preview. | |
| maxDepth | No | Max tree depth | |
| maxLines | No | Max lines (default: 100) | |
| selector | No | CSS selector to scope snapshot to specific element (e.g., "#app") | |
| includeAll | No | Include all visible elements without relevance filtering. Useful for Vue/Livewire apps (default: false) | |
| includeText | No | Include text (default: true) | |
| includeAttributes | No | Include ARIA attributes (default: false) |