Skip to main content
Glama

browser_console_messages

Retrieve browser console messages from automated web pages to monitor errors, warnings, and debug information during testing.

Instructions

Returns all console messages

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
levelNoLevel of the console messages to return. Each level includes the messages of more severe levels. Defaults to "info".info

Implementation Reference

  • The core handler logic for the 'browser_console_messages' tool. It retrieves all console messages from the current tab and adds each as a result to the response.
    handle: async (tab, params, response) => { tab.consoleMessages().map(message => response.addResult(message.toString())); },
  • Schema definition for the 'browser_console_messages' tool, specifying name, title, description, empty input schema, and readOnly type.
    schema: { name: 'browser_console_messages', title: 'Get console messages', description: 'Returns all console messages', inputSchema: z.object({}), type: 'readOnly', },
  • Exports the defined console tool for inclusion in the aggregate tools list.
    export default [ console, ];
  • src/tools.ts:36-52 (registration)
    Registers the console tool (via spread) into the central allTools array used by the browser server backend.
    export const allTools: Tool<any>[] = [ ...common, ...console, ...dialogs, ...evaluate, ...files, ...install, ...keyboard, ...navigate, ...network, ...mouse, ...pdf, ...screenshot, ...snapshot, ...tabs, ...wait, ];

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/nzjami/mcpPlaywright'

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