Observers
Console output, network requests and native dialogs. Requires --enable-observers.
Generated from @mehmoodqureshi/chrome-mcp 0.9.11. 3 tools.
console_logs
Console output and uncaught errors recorded on the page (requires --enable-observers). This is how you find out WHY a page misbehaved rather than only what it looks like afterwards. Pass sinceSeq to poll for what is new, clear:true to drain.
| Argument | Type | Required | Description |
|---|---|---|---|
level | "log" | "info" | "warn" | "error" | "debug" | "exception" | no | Only entries at this level |
frameId | number | no | Frame id from frames_list |
allFrames | boolean | no | Act on the first match in ANY frame (the element may be in an iframe) |
sinceSeq | number | no | Only entries newer than this seq (from a previous call) |
limit | number | no | Max entries to return (default 200) |
clear | boolean | no | Empty the buffer after reading |
tabId | string | no | Tab id (default: active tab) |
{
"tool": "console_logs",
"args": {
"level": "log"
}
}network_log
Requests the page made - fetch and XMLHttpRequest with method, URL, status and duration (requires --enable-observers). Set includeResources:true to also list scripts/images/styles from Resource Timing (those carry timing and size but no status). Does not include the document request or headers.
| Argument | Type | Required | Description |
|---|---|---|---|
urlContains | string | no | Only requests whose URL contains this substring |
frameId | number | no | Frame id from frames_list |
allFrames | boolean | no | Act on the first match in ANY frame (the element may be in an iframe) |
failedOnly | boolean | no | Only requests that errored or returned status >= 400 |
includeResources | boolean | no | Also include Resource Timing entries (scripts, images, styles) |
sinceSeq | number | no | |
limit | number | no | |
clear | boolean | no | |
tabId | string | no | Tab id (default: active tab) |
{
"tool": "network_log",
"args": {
"urlContains": "<urlContains>"
}
}dialogs
Native dialogs (alert/confirm/prompt/beforeunload) the page raised, and how they were answered (requires --enable-observers). With observers on, dialogs are intercepted rather than left to block the renderer - which is what otherwise turns a click that opens a confirm() into a mystery TIMEOUT. Set policy:'accept' to answer confirms with true.
| Argument | Type | Required | Description |
|---|---|---|---|
policy | "dismiss" | "accept" | no | How to answer future dialogs (default dismiss: confirm->false, prompt->null) |
frameId | number | no | Frame id from frames_list |
allFrames | boolean | no | Act on the first match in ANY frame (the element may be in an iframe) |
promptText | string | no | Text to answer prompt() with when policy is 'accept' |
sinceSeq | number | no | |
limit | number | no | |
clear | boolean | no | |
tabId | string | no | Tab id (default: active tab) |
{
"tool": "dialogs",
"args": {
"policy": "dismiss"
}
}