Skip to main content
Glama

Get console messages

browser_console_messages
Destructive

Returns all console messages. Takes the session_id from open_browser. 0.1¢ a step that runs.

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_id": "<session_id>",
      "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.
levelYesLevel of the console messages to return. Each level includes the messages of more severe levels. Defaults to "info".info
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.
session_idYesThe session id open_browser returned.

Output Schema

NameRequiredDescriptionDefault
urlNoThe address of the page after the step.
errorNoWhy the step failed, when it failed.
titleNoThe page title.
read_atNoWhen the page was read.
took_msNoHow long the step took.
price_usdNoWhat the step cost, in dollars.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "description": "The page after the step, and what the step cost.",
      +  "properties": {
      +    "error": {
      +      "description": "Why the step failed, when it failed.",
      +      "type": "object"
      +    },
      +    "price_usd": {
      +      "description": "What the step cost, in dollars.",
      +      "type": "number"
      +    },
      +    "read_at": {
      +      "description": "When the page was read.",
      +      "type": "string"
      +    },
      +    "title": {
      +      "description": "The page title.",
      +      "type": "string"
      +    },
      +    "took_ms": {
      +      "description": "How long the step took.",
      +      "type": "integer"
      +    },
      +    "url": {
      +      "description": "The address of the page after the step.",
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  2. Added

TDQS

C2.9/5.0
Behavior2/5

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

The definition says only that it 'Returns all console messages', implying a passive read, while annotations declare readOnlyHint=false and destructiveHint=true. The description never discloses that supplying filename writes to the workspace root or overwrites existing files, which is the likeliest source of the destructive hint. It does add one useful trait beyond the annotations, the per-step cost ('0.1¢ a step that runs'), but leaves the destructive surface undocumented.

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

Conciseness4/5

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

Three short sentences with the core behavior front-loaded and no filler. The pricing sentence is grammatically clipped ('0.1¢ a step that runs') but still parseable, and the terseness is a symptom of under-specification rather than verbosity.

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?

An output schema exists, so return shape need not be described, but a 4-param tool carrying destructiveHint=true and openWorldHint=true needs more than one sentence of behavior. Nothing tells the agent about file-write side effects, navigation-reset semantics, or how this differs from the other browser inspection tools. Only the cost note fills a genuine gap.

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 the baseline is 3; the schema already explains all, level, filename, and session_id. The description adds marginal value by tying session_id back to open_browser, but 'Returns all console messages' misrepresents the default level=info filtering and the all flag's navigation scope. Net effect is roughly neutral against a fully documented schema.

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 concrete verb and resource ('Returns all console messages'), so an agent knows this retrieves browser console output. It does not distinguish itself from close siblings such as browser_read or browser_network_requests, so it stops short of a 5. The claim 'all console messages' also slightly overstates what the level-filtered tool actually retrieves.

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 only contextual hint is provenance for one parameter ('Takes the session_id from open_browser'), which is a prerequisite, not when-to-use guidance. Nothing says when to pick this over browser_read, browser_network_requests, or browser_snapshot, and there are no exclusions. Usage is entirely implied by the name.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.