Network Monitoring
import { Aside } from ‘@astrojs/starlight/components’;
ptah_browser_network
Section titled “ptah_browser_network”Return a structured log of HTTP requests and responses observed since the browser was launched (or since the last reset).
Arguments
Section titled “Arguments”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
filter | string | no | — | Substring or regex matched against the request URL |
methods | string[] | no | all | Restrict to specific HTTP methods (e.g. ["POST", "PUT"]) |
statusRange | [number, number] | no | — | Only include responses with a status in this range |
includeBodies | boolean | no | false | Include request and response bodies when they are text/JSON |
since | number | no | — | Unix timestamp in milliseconds; only entries after this time |
reset | boolean | no | false | Clear the log after returning results |
Example — failed API calls
Section titled “Example — failed API calls”{ "tool": "ptah_browser_network", "arguments": { "statusRange": [400, 599], "methods": ["GET", "POST"], "includeBodies": true }}Response shape
Section titled “Response shape”{ "entries": [ { "id": "req_42", "url": "https://api.example.com/v1/users", "method": "POST", "status": 401, "requestHeaders": { "content-type": "application/json" }, "responseHeaders": { "content-type": "application/json" }, "requestBody": "{\"email\":\"...\"}", "responseBody": "{\"error\":\"unauthorized\"}", "timings": { "startedAt": 1_700_000_000_123, "durationMs": 212 } } ], "dropped": 0}Limits
Section titled “Limits”- The log keeps the last 500 entries per browser session. Older entries are dropped and counted in
dropped. - Bodies larger than 1 MB are truncated. The
truncated: trueflag is set on the entry. - Binary responses (images, fonts) never include bodies, even when
includeBodiesistrue.