read_console_messages
Retrieve browser console messages from a specific tab, filter with a regex pattern, and debug JavaScript errors or review application logs without noise.
Instructions
Read browser console messages (console.log, console.error, console.warn, etc.) from a specific tab. Useful for debugging JavaScript errors, viewing application logs, or understanding what's happening in the browser console. Returns console messages from the current domain only. If you don't have a valid tab ID, use tabs_context first to get available tabs. IMPORTANT: Always provide a pattern to filter messages - without a pattern, you may get too many irrelevant messages.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clear | No | If true, clear the console messages after reading to avoid duplicates on subsequent calls. Default is false. | |
| limit | No | Maximum number of messages to return. Defaults to 100. Increase only if you need more results. | |
| tabId | Yes | Tab ID to read console messages from. Must be a tab in the current group. Use tabs_context first if you don't have a valid tab ID. | |
| pattern | No | Regex pattern to filter console messages. Only messages matching this pattern will be returned (e.g., 'error|warning' to find errors and warnings, 'MyApp' to filter app-specific logs). You should always provide a pattern to avoid getting too many irrelevant messages. | |
| onlyErrors | No | If true, only return error and exception messages. Default is false (return all message types). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| provenance | No |