Read console messages
read_console_messagesRead console logs, warnings, errors and uncaught exceptions from a browser tab while connected. Filter messages with a case-insensitive regex pattern or restrict results to errors only.
Instructions
Read console messages (console.log/warn/error, uncaught exceptions) from a tab, captured while connected. Messages from a previous site are dropped when the tab navigates to another origin. Always provide a pattern to filter out noise.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"tabId": "<tabId>"
},
"name": "read_console_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clear | No | Clear the returned messages after reading. | |
| limit | No | Maximum messages (default 100, most recent). | |
| tabId | Yes | Tab ID from tabs_context / tabs_create. | |
| pattern | No | Case-insensitive regex the message must match. | |
| onlyErrors | No | Only errors and uncaught exceptions. |