64 lines
2.5 KiB
JSON
64 lines
2.5 KiB
JSON
{
|
|
"name": "chrome_console",
|
|
"description": "Capture console output from a browser tab. Supports snapshot mode (default; one-time capture with ~2s wait) and buffer mode (persistent per-tab buffer you can read/clear instantly without waiting).",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"url": {
|
|
"type": "string",
|
|
"description": "URL to navigate to and capture console from. If not provided, uses the current active tab"
|
|
},
|
|
"tabId": {
|
|
"type": "number",
|
|
"description": "Target an existing tab by ID (default: active tab)."
|
|
},
|
|
"windowId": {
|
|
"type": "number",
|
|
"description": "Target window ID to pick active tab when tabId is omitted."
|
|
},
|
|
"background": {
|
|
"type": "boolean",
|
|
"description": "Do not activate tab/focus window when capturing via CDP. Default: false"
|
|
},
|
|
"includeExceptions": {
|
|
"type": "boolean",
|
|
"description": "Include uncaught exceptions in the output (default: true)"
|
|
},
|
|
"maxMessages": {
|
|
"type": "number",
|
|
"description": "Maximum number of console messages to capture in snapshot mode (default: 100). If limit is provided, it takes precedence."
|
|
},
|
|
"mode": {
|
|
"type": "string",
|
|
"enum": ["snapshot", "buffer"],
|
|
"description": "Console capture mode: snapshot (default; waits ~2s for messages) or buffer (persistent per-tab buffer; reads from memory instantly)."
|
|
},
|
|
"buffer": {
|
|
"type": "boolean",
|
|
"description": "Alias for mode=\"buffer\" (default: false)."
|
|
},
|
|
"clear": {
|
|
"type": "boolean",
|
|
"description": "Buffer mode only: clear the buffered logs for this tab before reading (default: false). Use clearAfterRead instead to clear after reading (mcp-tools.js style)."
|
|
},
|
|
"clearAfterRead": {
|
|
"type": "boolean",
|
|
"description": "Buffer mode only: clear the buffered logs for this tab AFTER reading, to avoid duplicate messages on subsequent calls (default: false). This matches mcp-tools.js behavior."
|
|
},
|
|
"pattern": {
|
|
"type": "string",
|
|
"description": "Optional regex filter applied to message/exception text. Supports /pattern/flags syntax."
|
|
},
|
|
"onlyErrors": {
|
|
"type": "boolean",
|
|
"description": "Only return error-level console messages (and exceptions when includeExceptions=true). Default: false."
|
|
},
|
|
"limit": {
|
|
"type": "number",
|
|
"description": "Limit returned console messages. In snapshot mode this is an alias for maxMessages; in buffer mode it limits returned messages from the buffer."
|
|
}
|
|
},
|
|
"required": []
|
|
}
|
|
}
|