browser_console_messages
Retrieve recent browser console messages and uncaught exceptions for the active tab. Filter by level or timestamp, and optionally clear the buffer after retrieval.
Instructions
Recent browser console + uncaught exceptions for the active tab. Capture starts when the session attaches CDP (eagerly on session_start). Returns the last N messages, optionally filtered by level or timestamp. Pass clear=true to drain.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "browser_console_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tabId | No | ||
| level | No | Filter: log | info | warn | error | debug. | |
| since | No | Unix-ms timestamp; only messages at or after this are returned. | |
| limit | No | Max messages returned (capped at 500). | |
| clear | No | Empty the buffer after returning. |