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}`);
    });
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions that logs are 'captured during the session', implying real-time or session-specific data, but lacks details on format, volume, permissions, or potential side effects like performance impact. This leaves significant gaps for a tool that retrieves data.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence that front-loads the core action and resource without any wasted words. It's efficiently structured and easy to parse, making it highly concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what 'console logs' entail (e.g., error messages, browser logs), the return format, or any limitations, which is inadequate for a tool that retrieves session data without structured output documentation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately doesn't add unnecessary param details, earning a high score for not overloading with irrelevant information.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Get') and resource ('all console logs captured during the session'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_text' or 'screenshot', which might also retrieve session data, so it doesn't reach the highest score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'get_text' or 'screenshot', nor does it mention prerequisites or context for usage. It simply states what the tool does without indicating when it's appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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