fileforge_devtools_action
Capture and read console, JS errors, network, API, WebSocket, and performance data for a Chrome tab; run guarded JavaScript and replay requests when debugging.
Instructions
Read DevTools data for a tab, from the moment a session starts: console, JS errors, network requests, API responses, WebSockets and performance. Prefer query_devtools with a preset; the get_* actions are older. Attaches the debugger, so Chrome shows its debugging bar. evaluate runs JavaScript in the page and replay_request re-sends a request; both can change data and have guards. Needs the extension.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Modules to return and their options. Takes priority over preset. Modules: session, page, console, jsErrors, network, apiResponses, graphql, performance, webSockets, coverage, storageSummary, sourceMaps, requestChains, apiInsights, harSummary, security, thirdParties, issues, recommendations, summary, privacy. | |
| store | No | Save the result in ~/.fileforge and return a ref. | |
| tabId | No | Tab ID, or "active" for the active tab. | active |
| action | Yes | What to do. Required parameters are in brackets. query_devtools: Unified GraphQL-feel DevTools query. Select modules (console, jsErrors, network, apiResponses, graphql, performance, webSockets, coverage, storageSummary, sourceMaps, requestChains, apiInsights, harSummary, security, thirdParties, issues, recommendations, summary) and presets in one call. start_session: Start an instrumented DevTools capture session for a tab. stop_session: Stop the DevTools capture session. clear_session: Clear captured DevTools session data without detaching. session (operation): Unified session lifecycle action: operation = start | stop | clear | status. get_console: Read recent console messages. Legacy action — prefer query_devtools with console module. get_js_errors: Get JavaScript errors. Legacy action — prefer query_devtools with jsErrors module. get_network: Inspect network requests. Legacy action — prefer query_devtools with network module. get_api_responses: Extract API response bodies. Legacy action — prefer query_devtools with apiResponses module. get_performance: Get performance timing metrics. Legacy action — prefer query_devtools with performance module. get_websockets: Inspect WebSocket frames. Legacy action — prefer query_devtools with webSockets module. evaluate (expression): Run JS in page context via DevTools. Guarded: dryRun supported, dangerous patterns blocked unless allowDangerous=true. replay_request (requestId): Replay a captured network request. Guarded: dryRun supported, non-idempotent methods and risky endpoints blocked unless allowUnsafeMethods=true. export_har: Export the captured session as a HAR archive on disk. | |
| dryRun | No | Report what would happen without doing it. | |
| filter | No | Filter by status, type or URL. | |
| levels | No | Console levels to include. | |
| preset | No | Named set of query modules. | |
| filename | No | Output filename. | |
| operation | No | Session operation to perform. | |
| overrides | No | Request fields to change when replaying, such as method. | |
| requestId | No | ID of a captured network request. | |
| expression | No | JavaScript to run in the page. | |
| captureForMs | No | How long to capture, in milliseconds. | |
| includeBodies | No | Include response bodies. | |
| allowDangerous | No | Allow expressions the safety check blocks. Use with care. | |
| autoStartSession | No | Start a capture session if none is running. | |
| stopAfterCapture | No | Stop the session after capturing. | |
| allowUnsafeMethods | No | Allow replaying non-idempotent requests. Use with care. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | False if the action failed or a check did not pass. | |
| ref | No | Stored result ID, for fileforge_result_action. | |
| data | No | The result. Its shape depends on the action. | |
| meta | No | Tool, action and context. | |
| error | No | Failure code and message. | |
| warnings | No | Notes about a call that still ran. |