intercept_and_modify_traffic
Intercept and modify network requests in real-time before they are sent, preserving cookies and authentication while supporting changes to headers, body, and method.
Instructions
Intercept and modify network requests in real-time before sending. Preserves cookies and authentication. Supports header/body/method changes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tabId | No | Tab ID (optional) | |
| action | Yes | Action object (NOT string). Example: { type: "click", selector: ".button" } | |
| urlPattern | Yes | URL pattern to intercept (e.g., "**/api/**", "*/graphql*") | |
| modifications | Yes | Modifications object (NOT string). Example: { addHeaders: { "X-Test": "value" } } | |
| captureResponse | No | Also capture the response after modification |