Skip to main content
Glama

get_console_logs

Retrieve browser console logs captured during web testing sessions to identify JavaScript errors, warnings, and debugging information for quality assurance.

Instructions

Get all console logs captured during the session

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Implements the core logic for retrieving captured console logs from the browser session.
    async getConsoleLogs() { return this.consoleLogs.length > 0 ? this.consoleLogs.join('\n') : 'No console logs captured.'; }
  • Defines the tool schema with name, description, and empty input schema (no parameters required).
    { name: "get_console_logs", description: "Get all console logs captured during the session", inputSchema: { type: "object", properties: {}, }, },
  • src/index.ts:142-144 (registration)
    Registers the tool handler by dispatching to browserManager.getConsoleLogs() in the tool call switch statement.
    case "get_console_logs": result = await browserManager.getConsoleLogs(); break;
  • Sets up Puppeteer page event listener to capture console messages into the logs array used by getConsoleLogs.
    this.page.on('console', msg => { const type = msg.type().toUpperCase(); const text = msg.text(); this.consoleLogs.push(`[${type}] ${text}`); });

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/samusilv/qa-agent-mcp'

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