Skip to main content
Glama

browser_console_logs

Retrieves recent console.log, warn, and error messages from the current page to debug browser issues, installing a lightweight interceptor on first call and returning the last N entries.

Instructions

Get recent console.log/warn/error messages from the page. Installs a lightweight interceptor on first call. Returns the last N console messages.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "browser_console_logs"
  }
}

Input Schema

NameRequiredDescriptionDefault
countNoNumber of recent messages to return (default: 50)
partitionNoRun this call in a partition from browser_partition (an id like "p1"). Leave it out for the default partition. An unknown or closed id is an error; the call is never sent to the default partition instead.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.33.0
    • addedInput schema / properties / partition
      Added value: +{
      +  "description": "Run this call in a partition from browser_partition (an id like \"p1\"). Leave it out for the default partition. An unknown or closed id is an error; the call is never sent to the default partition instead.",
      +  "type": "string"
      +}
  2. First observedv1.0.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose a real side effect: a 'lightweight interceptor' is installed on first call, which implicitly bounds the results to messages after that point. It omits whether the interceptor persists across calls or reloads, and whether installing it can affect page behavior.

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?

Three short sentences with the core capability front-loaded and the interceptor side effect immediately after. No filler and nothing redundant.

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

Completeness3/5

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

There is no output schema, so the return shape is only gestured at as 'the last N console messages' – no indication of whether entries carry level, timestamp, or source, nor whether order is oldest-to-newest. The interceptor caveat partially covers capture-scope limits, but the response contract remains underspecified.

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

Parameters3/5

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

Schema description coverage is 100%, so both parameters, including the count default of 50 and the partition error behavior, are already documented. The description only restates the 'last N' notion and adds nothing about windowing, ordering, or what a partition switch means for captured logs.

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?

States a specific verb and resource: 'Get recent console.log/warn/error messages from the page.' This is unmistakably distinct from page content, screenshot, or script-execution siblings, though the description never explicitly contrasts itself with any of them.

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?

No when-to-use or when-not-to-use guidance. It never says to prefer this over browser_get_page_content or browser_execute_script for reading diagnostics, and it doesn't warn that logs emitted before the first call are unavailable.

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