Skip to main content
Glama

browser_console_messages

Retrieve and manage all console messages from browser interactions using Playwright MCP, enabling detailed debugging and monitoring of web activities.

Instructions

Returns all console messages

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that executes the tool logic: retrieves console messages from the tab and adds them to the response.
    handle: async (tab, params, response) => { tab.consoleMessages().map(message => response.addResult(message.toString())); },
  • The tool schema defining name, title, description, input schema (empty object), and type as readOnly.
    schema: { name: 'browser_console_messages', title: 'Get console messages', description: 'Returns all console messages', inputSchema: z.object({}), type: 'readOnly', },
  • src/tools.ts:36-52 (registration)
    Registration of all tools, including the browser_console_messages tool imported from console and spread into the allTools array.
    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