Skip to main content
Glama

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
NameRequiredDescriptionDefault
session_idYes
limitNo

Implementation Reference

  • 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),
        }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/LvcidPsyche/auto-browser'

If you have feedback or need assistance with the MCP directory API, please join our Discord server