Skip to content

Network Monitoring

import { Aside } from ‘@astrojs/starlight/components’;

Return a structured log of HTTP requests and responses observed since the browser was launched (or since the last reset).

NameTypeRequiredDefaultDescription
filterstringnoSubstring or regex matched against the request URL
methodsstring[]noallRestrict to specific HTTP methods (e.g. ["POST", "PUT"])
statusRange[number, number]noOnly include responses with a status in this range
includeBodiesbooleannofalseInclude request and response bodies when they are text/JSON
sincenumbernoUnix timestamp in milliseconds; only entries after this time
resetbooleannofalseClear the log after returning results
{
"tool": "ptah_browser_network",
"arguments": {
"statusRange": [400, 599],
"methods": ["GET", "POST"],
"includeBodies": true
}
}
{
"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
}
  • 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: true flag is set on the entry.
  • Binary responses (images, fonts) never include bodies, even when includeBodies is true.