Skip to main content
Glama
playwright-mcp-router

playwright-mcp-router

by huangzt

browser_console_messages

Read-only

Retrieve browser console messages from an isolated Playwright session, filter them by severity level, and optionally save the output to a file for debugging.

Instructions

Returns all console messages

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "session": "<session>",
      "level": "<level>"
    },
    "name": "browser_console_messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
allNoReturn all console messages since the beginning of the session, not just since the last navigation. Defaults to false.
colorNoOptional Chrome tab group color override for a newly created session.
levelYesLevel of the console messages to return. Each level includes the messages of more severe levels. Defaults to "info".info
accountNoChrome account profile to use (defaults to 'default'). Configured accounts: 'default' (Isolated Browser).default
sessionYesRequired isolated session name (also displayed as the Chrome tab group title), e.g. "T1867-api-debug" or "home-css". Use a unique, descriptive task name per conversation so concurrent agents never hijack each other's active tab.
filenameNoFile name to save the console messages to. Relative file names are resolved against the workspace root. If not provided, messages are returned as text.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.5/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=true, openWorldHint=true and destructiveHint=false, so the safety profile is covered by structured data. The description adds nothing beyond that: no mention that results are scoped to the current session/tab group, no note that `filename` switches output from text to a written file, and its use of "all" actually undercuts the real default scoping behavior.

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

Conciseness3/5

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

A single short sentence with zero redundancy, which is good, but there is no structure or front-loading of the constraints an agent actually needs before calling. Brevity here comes at the cost of substance rather than from efficient editing.

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?

This is a six-parameter tool with a required, concurrency-critical `session` name and a level-filtering semantic where each level includes more severe levels. None of that surfaces in the description, and with no output schema the description should at least indicate the text-vs-file return behavior, which it does not.

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 every one of the six parameters, including the enum values for `level` and `color`, is fully documented in the schema. The description adds no supplementary meaning such as level severity stacking or session-name conventions, so the baseline of 3 applies.

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

Purpose3/5

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

"Returns all console messages" gives a verb and a resource, so the basic purpose is legible. But there is no differentiation from any sibling (e.g. browser_network_requests, browser_evaluate), and the word "all" is imprecise since the `all` parameter defaults to false, meaning the default scope is only messages since the last navigation.

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?

There is no when-to-use guidance at all: no mention of using this while debugging page errors, no indication of when to prefer browser_evaluate or browser_network_requests instead, and no note on the per-session isolation requirement that governs safe invocation.

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