Skip to main content
Glama

Wait for an extension log

wait_for_log
Read-only

Wait until a Chrome extension logs a message matching a pattern, so you can confirm a reproduced problem or reload produced the expected output. Only new entries logged after the call starts are checked.

Instructions

Wait until a Chrome extension logs a message matching a pattern, such as after asking the user to reproduce a problem or reload the extension. By default, only entries logged after this call starts are considered.

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": {
      "pattern": "<pattern>"
    },
    "name": "wait_for_log"
  }
}

Input Schema

NameRequiredDescriptionDefault
afterNoCursor from a previous result. Defaults to the latest entry, so only new logs match.
levelsNoConsole methods to include, like ["error", "warn"]. Defaults to all.
browserNoOnly include logs from this browser, by the name or ID that list_sources shows.
patternYesCase-insensitive regular expression to match against the message text.
filenameNoOnly include logs from pages or scripts whose filename contains this, like "popup".
extensionNoOnly include logs from this extension, by ID or exact name.
timeoutSecondsNoHow long to wait. Defaults to 30.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Adds real behavioral context beyond readOnlyHint=true: the call blocks, and by default only entries logged after invocation count. It leaves one material gap — what happens when the wait exceeds timeoutSeconds (empty result, error, or partial) is not stated.

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?

Two sentences, no waste, with the blocking condition front-loaded ahead of the default-behavior caveat. Slightly terse given it is the only prose an agent gets for a blocking tool.

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

Completeness4/5

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

For a read-only blocking wait with a fully documented schema, the description covers purpose, trigger context, and the key default. The missing piece is timeout outcome behavior, which matters because the tool can fail to match within its window.

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 all seven parameters are already documented. The description only reinforces the default-new-entries semantics behind 'after'; it adds no syntax or format detail beyond the schema, so baseline 3 applies.

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 condition: 'Wait until a Chrome extension logs a message matching a pattern.' This is clearly distinct from a snapshot-style log fetcher, though the description never names get_logs as the non-blocking alternative.

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

Usage Guidelines4/5

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

Gives concrete triggering contexts ('after asking the user to reproduce a problem or reload the extension'), which tells an agent exactly when a blocking wait is appropriate. It stops short of explicitly contrasting with get_logs for the case where the log already exists.

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