Skip to main content
Glama

browser_console_messages

Retrieve console messages from browser sessions to monitor JavaScript errors, warnings, and logs during automated testing or web scraping.

Instructions

Get console

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
levelNo

Implementation Reference

  • index.js:460-466 (registration)
    Registration of the 'browser_console_messages' tool. It uses `proxyToolCall` to delegate the execution.
    server.tool('browser_console_messages', 'Get console', {
      level: z.string().optional()
    }, async (args) => {
      const check = requireActivePage();
      if (check) return check;
      return proxyToolCall('browser_console_messages', args);
    });
  • The proxyToolCall function acts as the handler implementation, delegating the tool call to the client instance.
    async function proxyToolCall(toolName, args) {
      log(`[proxyToolCall] ${toolName} with args: ${JSON.stringify(args)}`);
      const { client } = await getOrCreateInstance();
      log(`[proxyToolCall] got client for port ${assignedPort}`);
    
      // Update last used
      if (assignedPort && instances.has(assignedPort)) {
        instances.get(assignedPort).lastUsed = Date.now();
      }
    
      try {
        log(`[proxyToolCall] Calling client.callTool...`);
        const result = await client.callTool({ name: toolName, arguments: args || {} });
        log(`[proxyToolCall] Result type: ${typeof result}`);
        log(`[proxyToolCall] Result: ${JSON.stringify(result).slice(0, 500)}`);
    
        // The SDK returns { content: [...], isError?: boolean }
Behavior1/5

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

No annotations are present, yet the description provides zero behavioral context. It does not disclose whether messages are cleared after retrieval, what format data is returned in, pagination behavior, or filtering capabilities.

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

Conciseness2/5

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

While brief (two words), this represents under-specification rather than efficient information density. The extreme brevity provides minimal value and forces the agent to guess intent.

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

Completeness1/5

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

Given the presence of a parameter and multiple browser-related siblings, the description is inadequate. It explains neither the parameter's role nor the tool's specific value proposition within the browser tool suite.

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

Parameters1/5

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

With schema description coverage at 0%, the description must compensate for the undocumented 'level' parameter. It completely fails to do so, leaving the parameter's purpose (log level filtering?) and valid values entirely unspecified.

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

Purpose2/5

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

The phrase 'Get console' is extremely vague and tautological (restating the tool name). While it uses a verb ('Get'), it fails to clarify whether it retrieves console messages, the console object, or opens the console UI, and does not distinguish from sibling tools like browser_evaluate.

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

Usage Guidelines1/5

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

No guidance provided on when to use this tool versus alternatives (e.g., browser_evaluate for executing JS, browser_snapshot for page state), nor any prerequisites or conditions for use.

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/OMGEverdo/browser-pool-mcp'

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