Console logs
console_logsReads a tab's console messages, uncaught exceptions, promise rejections, and browser warnings from pages, iframes, and workers, with filters for level, time, pattern, and stack traces.
Instructions
Reads the tab's console like the DevTools Console panel: console.* calls, uncaught exceptions and promise rejections (with stack traces), and browser-side messages (network errors, violations, deprecations) — from the page and its iframes/workers. Messages logged before the agent started watching are included as far as Chrome kept them.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clear | No | Clear the buffer after reading. | |
| limit | No | Return at most this many of the newest matching messages (default 100). | |
| since | No | Only messages after this time (ms since epoch). | |
| stack | No | Include stack traces (default: only for errors). | |
| tabId | No | Tab to act on. Defaults to the session target tab (see tab_select). | |
| levels | No | Only these levels (default all). | |
| pattern | No | Only messages matching this regular expression (case-insensitive). |