DevTools
Claudezilla provides browser DevTools capabilities through three tools that let you inspect console output, monitor network activity, and execute JavaScript in the page context. ## firefox_get_console Get captured console logs from the page. Captures `console.log`, `console.warn`, `console.error`, and uncaught exceptions. Works on background tabs. ### Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | `tabId` | number | No | Active tab | Target tab ID. Works on background tabs. | | `level` | string | No | All levels | Filter by log level: `log`, `warn`, `error`, `info`, `debug` | | `clear` | boolean | No | `false` | Clear logs after returning | | `limit` | number | No | `100` | Maximum logs to return | | `timeout` | number | No | `150000` | Request timeout in ms (5000-300000) | ### Example ```js // Get all console errors const result = await firefox_get_console({ level: "error" }); // Get recent logs and clear the buffer const result = await firefox_get_console({ limit: 20, clear: true }); // Check a specific tab's console const result = await firefox_get_console({ tabId: 42, level: "warn" }); ``` ### Notes - Console capture is opt-in and must be enabled on the page. - Logs accumulate until cleared. Use `clear: true` to reset the buffer after reading. - Uncaught exceptions are captured alongside regular console output. --- ## firefox_get_network Get captured network requests. Shows XHR, fetch, script, image, and other resource requests with status codes and timing. Works on background tabs. ### Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | `tabId` | number | No | Active tab | Target tab ID. Works on background tabs. | | `type` | string | No | All types | Filter by request type: `xmlhttprequest`, `script`, `stylesheet`, `image`, `font`, etc. | | `status` | string | No | All | Filter by status: `pending`, `completed`, `error` | | `clear` | boolean | No | `false` | Clear requests after returning | | `limit` | number | No | `50` | Maximum requests to return | | `includeHeaders` | boolean | No | `false` | Include response headers in output (stripped by default to reduce payload) | | `timeout` | number | No | `150000` | Request timeout in ms (5000-300000) | ### Example ```js // Get all failed network requests const result = await firefox_get_network({ status: "error" }); // Monitor API calls only const result = await firefox_get_network({ type: "xmlhttprequest" }); // Get requests with full headers for debugging const result = await firefox_get_network({ type: "xmlhttprequest", includeHeaders: true, limit: 10 }); ``` ### Notes - Response headers are stripped by default to reduce payload size. Pass `includeHeaders: true` when you need them. - Request bodies are never captured to prevent credential leakage. - Sensitive URL parameters are redacted in the output. --- ## firefox_evaluate Execute JavaScript in the page context and return the result. Useful for extracting data, checking state, or debugging. Works on background tabs. ### Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | `tabId` | number | No | Active tab | Target tab ID. Works on background tabs. | | `expression` | string | **Yes** | - | JavaScript expression to evaluate | | `timeout` | number | No | `150000` | Request timeout in ms (5000-300000) | ### Example ```js // Get the page title const result = await firefox_evaluate({ expression: "document.title" }); // Read localStorage const result = await firefox_evaluate({ expression: "window.localStorage.getItem('user-preferences')" }); // Check element count const result = await firefox_evaluate({ expression: "document.querySelectorAll('.item').length" }); // Get computed style const result = await firefox_evaluate({ expression: "getComputedStyle(document.querySelector('.hero')).fontSize" }); ``` ### Notes - **Security restrictions apply.** Dangerous patterns are blocked, including `fetch()`, `eval()`, and cookie access. - The expression runs in the page's own context, so you have access to the page's DOM, globals, and framework state. - Return values are serialized to JSON. Complex objects may be truncated.Claudezilla provides browser DevTools capabilities through three tools that let you inspect console output, monitor network activity, and execute JavaScript in the page context.
firefox_get_console
Section titled “firefox_get_console”Get captured console logs from the page. Captures console.log, console.warn, console.error, and uncaught exceptions. Works on background tabs.
Parameters
Section titled “Parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
tabId | number | No | Active tab | Target tab ID. Works on background tabs. |
level | string | No | All levels | Filter by log level: log, warn, error, info, debug |
clear | boolean | No | false | Clear logs after returning |
limit | number | No | 100 | Maximum logs to return |
timeout | number | No | 150000 | Request timeout in ms (5000-300000) |
Example
Section titled “Example”// Get all console errorsconst result = await firefox_get_console({ level: "error" });
// Get recent logs and clear the bufferconst result = await firefox_get_console({ limit: 20, clear: true });
// Check a specific tab's consoleconst result = await firefox_get_console({ tabId: 42, level: "warn" });- Console capture is opt-in and must be enabled on the page.
- Logs accumulate until cleared. Use
clear: trueto reset the buffer after reading. - Uncaught exceptions are captured alongside regular console output.
firefox_get_network
Section titled “firefox_get_network”Get captured network requests. Shows XHR, fetch, script, image, and other resource requests with status codes and timing. Works on background tabs.
Parameters
Section titled “Parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
tabId | number | No | Active tab | Target tab ID. Works on background tabs. |
type | string | No | All types | Filter by request type: xmlhttprequest, script, stylesheet, image, font, etc. |
status | string | No | All | Filter by status: pending, completed, error |
clear | boolean | No | false | Clear requests after returning |
limit | number | No | 50 | Maximum requests to return |
includeHeaders | boolean | No | false | Include response headers in output (stripped by default to reduce payload) |
timeout | number | No | 150000 | Request timeout in ms (5000-300000) |
Example
Section titled “Example”// Get all failed network requestsconst result = await firefox_get_network({ status: "error" });
// Monitor API calls onlyconst result = await firefox_get_network({ type: "xmlhttprequest" });
// Get requests with full headers for debuggingconst result = await firefox_get_network({ type: "xmlhttprequest", includeHeaders: true, limit: 10});- Response headers are stripped by default to reduce payload size. Pass
includeHeaders: truewhen you need them. - Request bodies are never captured to prevent credential leakage.
- Sensitive URL parameters are redacted in the output.
firefox_evaluate
Section titled “firefox_evaluate”Execute JavaScript in the page context and return the result. Useful for extracting data, checking state, or debugging. Works on background tabs.
Parameters
Section titled “Parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
tabId | number | No | Active tab | Target tab ID. Works on background tabs. |
expression | string | Yes | - | JavaScript expression to evaluate |
timeout | number | No | 150000 | Request timeout in ms (5000-300000) |
Example
Section titled “Example”// Get the page titleconst result = await firefox_evaluate({ expression: "document.title" });
// Read localStorageconst result = await firefox_evaluate({ expression: "window.localStorage.getItem('user-preferences')"});
// Check element countconst result = await firefox_evaluate({ expression: "document.querySelectorAll('.item').length"});
// Get computed styleconst result = await firefox_evaluate({ expression: "getComputedStyle(document.querySelector('.hero')).fontSize"});- Security restrictions apply. Dangerous patterns are blocked, including
fetch(),eval(), and cookie access. - The expression runs in the page’s own context, so you have access to the page’s DOM, globals, and framework state.
- Return values are serialized to JSON. Complex objects may be truncated.