charlotte_observe
Get the current page state with adjustable detail levels (minimal, summary, full) and views (default, tree, tree-labeled). Optionally scope to a CSS selector or include computed styles.
Instructions
Get current page state without performing any action. Use detail levels to control verbosity: "minimal" for landmarks, headings, and interactive element counts by landmark (use charlotte_find to get specific elements with actionable IDs, or observe({ detail: "summary" }) to see all elements), "summary" (default) for content summaries and full element list, "full" for all text content. Use view: "tree" for a compact structural outline (cheapest orientation tool), or view: "tree-labeled" to include labels on interactive elements (still much cheaper than minimal JSON, and shows which button/link/input is which).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| detail | No | "summary" (default), "full" (includes all text content), "minimal" (landmarks + interactive only) | |
| view | No | "default" (structured JSON), "tree" (compact structural outline — element types only, cheapest), or "tree-labeled" (structural outline with interactive element labels — shows which button/link/input is which, still ~70% cheaper than minimal JSON) | |
| selector | No | CSS selector to scope observation to a subtree | |
| include_styles | No | Include computed styles for visible elements (default: false) | |
| output_file | No | Write observation data to this file path instead of returning inline. Relative paths resolve against output_dir (see charlotte_configure). Returns only a confirmation with the file path and size. |