get_page_context
Get a DOM snapshot of the current page to understand its layout before writing userscripts. It saves the snapshot to a file by default and returns a summary plus path to keep context window small.
Instructions
Get a DOM snapshot of the current page including URL, title, page structure, and visible elements. Use this to understand the page layout before writing userscripts that manipulate it. WRITES A FILE by default: the full snapshot goes to .customaise/page-context.json in your workspace and this call returns a summary plus the path, so a large page does not fill your context window. Read the file with view_file or grep_search. If you have no filesystem tool, pass output: "inline" to get the whole snapshot in the response and write nothing to disk.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tabId | No | Tab ID to inspect. Defaults to the active tab. | |
| output | No | Where the full payload goes. "file" (default) writes it to .customaise/ in your workspace and returns a summary plus the path, which keeps a large payload out of your context window. "inline" writes nothing and returns the whole payload in this response. Use it when you have no filesystem tool to read the file with, such as a chat client. "auto" follows the CUSTOMAISE_MCP_OUTPUT environment variable, falling back to "file". |