browser.get_console
Retrieve recent console messages from an active browser session to monitor JavaScript errors, warnings, and logs for debugging and automation workflows.
Instructions
Read recent browser console messages for an active session.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | ||
| limit | No |
Implementation Reference
- controller/app/mcp_transport.py:304-310 (handler)The MCP resource handler for 'browser://{session_id}/console' which calls 'self.manager.get_console_messages'. Note that this is a resource rather than a tool, but it serves the purpose of retrieving console logs.
if resource == "console": result = await self.manager.get_console_messages(session_id, limit=50) return { "uri": uri, "mimeType": "application/json", "text": json.dumps(result.get("items", []), ensure_ascii=False), }