Skip to main content
Glama

interceptor_chrome_devtools_list_network

Retrieve and filter network requests captured from Chrome DevTools sessions to analyze HTTP/HTTPS traffic patterns and identify specific resources during web development testing.

Instructions

List network requests from the bound Chrome DevTools session.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
devtools_session_idYesSession ID from interceptor_chrome_devtools_attach
include_preserved_requestsNoInclude requests preserved over the last navigations
resource_typesNoFilter by resource types
page_idxNoPage number (0-based)
page_sizeNoPage size

Implementation Reference

  • The handler function for 'interceptor_chrome_devtools_list_network', which delegates the request to the DevTools bridge.
      "interceptor_chrome_devtools_list_network",
      "List network requests from the bound Chrome DevTools session.",
      {
        devtools_session_id: z.string().describe("Session ID from interceptor_chrome_devtools_attach"),
        include_preserved_requests: z.boolean().optional().default(false)
          .describe("Include requests preserved over the last navigations"),
        resource_types: z.array(z.string()).optional().describe("Filter by resource types"),
        page_idx: z.number().optional().describe("Page number (0-based)"),
        page_size: z.number().optional().describe("Page size"),
      },
      async ({ devtools_session_id, include_preserved_requests, resource_types, page_idx, page_size }) => {
        try {
          const { targetId } = await ensureSessionTargetIsAlive(devtools_session_id);
          const args: Record<string, unknown> = {
            includePreservedRequests: include_preserved_requests,
          };
          if (resource_types && resource_types.length > 0) args.resourceTypes = resource_types;
          if (page_idx !== undefined) args.pageIdx = page_idx;
          if (page_size !== undefined) args.pageSize = page_size;
    
          const devtoolsResult = await devToolsBridge.callAction(devtools_session_id, "listNetwork", args);
          return {
            content: [{
              type: "text",
              text: truncateResult({
                status: "success",
                devtools_session_id,
                target_id: targetId,
                devtoolsResult: sanitizeDevToolsPayload(devtoolsResult),
              }),
            }],
          };
        } catch (e) {
          return { content: [{ type: "text", text: JSON.stringify({ status: "error", error: errorToString(e) }) }] };
        }
      },
    );
  • Registration of the 'interceptor_chrome_devtools_list_network' tool.
      "interceptor_chrome_devtools_list_network",
      "List network requests from the bound Chrome DevTools session.",
      {
        devtools_session_id: z.string().describe("Session ID from interceptor_chrome_devtools_attach"),
        include_preserved_requests: z.boolean().optional().default(false)
          .describe("Include requests preserved over the last navigations"),
        resource_types: z.array(z.string()).optional().describe("Filter by resource types"),
        page_idx: z.number().optional().describe("Page number (0-based)"),
        page_size: z.number().optional().describe("Page size"),
      },
      async ({ devtools_session_id, include_preserved_requests, resource_types, page_idx, page_size }) => {
        try {
          const { targetId } = await ensureSessionTargetIsAlive(devtools_session_id);
          const args: Record<string, unknown> = {
            includePreservedRequests: include_preserved_requests,
          };
          if (resource_types && resource_types.length > 0) args.resourceTypes = resource_types;
          if (page_idx !== undefined) args.pageIdx = page_idx;
          if (page_size !== undefined) args.pageSize = page_size;
    
          const devtoolsResult = await devToolsBridge.callAction(devtools_session_id, "listNetwork", args);
          return {
            content: [{
              type: "text",
              text: truncateResult({
                status: "success",
                devtools_session_id,
                target_id: targetId,
                devtoolsResult: sanitizeDevToolsPayload(devtoolsResult),
              }),
            }],
          };
        } catch (e) {
          return { content: [{ type: "text", text: JSON.stringify({ status: "error", error: errorToString(e) }) }] };
        }
      },
    );
Install Server

Other Tools

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/yfe404/proxy-mcp'

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