browser_network_requests
Capture and analyze network traffic from browser sessions to monitor HTTP requests, responses, and performance data during web interactions.
Instructions
Get network requests
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "browser_network_requests"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- index.js:468-473 (registration)Registration of the 'browser_network_requests' tool which delegates to proxyToolCall.
server.tool('browser_network_requests', 'Get network requests', {}, async (args) => { const check = requireActivePage(); if (check) return check; return proxyToolCall('browser_network_requests', args); }); - index.js:209-225 (handler)The proxyToolCall function acts as the handler, which forwards the tool request to the underlying MCP client.
async function proxyToolCall(toolName, args) { log(`[proxyToolCall] ${toolName} with args: ${JSON.stringify(args)}`); const { client } = await getOrCreateInstance(); log(`[proxyToolCall] got client for port ${assignedPort}`); // Update last used if (assignedPort && instances.has(assignedPort)) { instances.get(assignedPort).lastUsed = Date.now(); } try { log(`[proxyToolCall] Calling client.callTool...`); const result = await client.callTool({ name: toolName, arguments: args || {} }); log(`[proxyToolCall] Result type: ${typeof result}`); log(`[proxyToolCall] Result: ${JSON.stringify(result).slice(0, 500)}`); // The SDK returns { content: [...], isError?: boolean }