Skip to main content
Glama

browser_network_requests

Capture and analyze network requests during web page interactions to monitor API calls and resource loading for debugging and testing purposes.

Instructions

Returns all network requests since loading the page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
includeStaticNoWhether to include successful static resources like images, fonts, scripts, etc. Defaults to false.

Implementation Reference

  • The handler function for 'browser_network_requests' that lists all network requests since page load by calling tab.requests() and rendering each with renderRequest.
    handle: async (tab, params, response) => { const requests = tab.requests(); [...requests.entries()].forEach(([req, res]) => response.addResult(renderRequest(req, res))); },
  • Schema definition including name, title, description, empty input schema, and readOnly type for the tool.
    name: 'browser_network_requests', title: 'List network requests', description: 'Returns all network requests since loading the page', inputSchema: z.object({}), type: 'readOnly', },
  • src/tools.ts:36-52 (registration)
    Registration of all tools including network tools (which contains browser_network_requests) into the allTools export array used for tool availability.
    export const allTools: Tool<any>[] = [ ...common, ...console, ...dialogs, ...evaluate, ...files, ...install, ...keyboard, ...navigate, ...network, ...mouse, ...pdf, ...screenshot, ...snapshot, ...tabs, ...wait, ];
  • src/tools.ts:25-25 (registration)
    Import statement for network tools module containing browser_network_requests.
    import network from './tools/network.js';
  • Helper function to render a network request and response into a formatted string.
    function renderRequest(request: playwright.Request, response: playwright.Response | null) { const result: string[] = []; result.push(`[${request.method().toUpperCase()}] ${request.url()}`); if (response) result.push(`=> [${response.status()}] ${response.statusText()}`); return result.join(' '); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nzjami/mcpPlaywright'

If you have feedback or need assistance with the MCP directory API, please join our Discord server