Skip to main content
Glama

browser_network_requests

Read-only

Capture all network requests made by a web page after loading to analyze API calls, resource loading, and performance metrics.

Instructions

Returns all network requests since loading the page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that retrieves all network requests using tab.requests() and adds rendered results to the response.
    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, input schema (empty object), and readOnly type for the browser_network_requests tool.
      name: 'browser_network_requests',
      title: 'List network requests',
      description: 'Returns all network requests since loading the page',
      inputSchema: z.object({}),
      type: 'readOnly',
    },
  • The tool definition using defineTabTool and export as default array for registration.
    const requests = defineTabTool({
      capability: 'core',
    
      schema: {
        name: 'browser_network_requests',
        title: 'List network requests',
        description: 'Returns all network requests since loading the page',
        inputSchema: z.object({}),
        type: 'readOnly',
      },
    
      handle: async (tab, params, response) => {
        const requests = tab.requests();
        [...requests.entries()].forEach(([req, res]) => response.addResult(renderRequest(req, res)));
      },
    });
    
    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(' ');
    }
    
    export default [
      requests,
    ];
  • Helper function to format a network request and optional response into a readable 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(' ');
    }
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate readOnlyHint=true, destructiveHint=false, and openWorldHint=true, covering safety and scope. The description adds minimal behavioral context by specifying 'since loading the page,' which clarifies temporal scope. However, it doesn't detail return format, pagination, or potential limitations, leaving gaps despite annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence that directly states the tool's purpose without any wasted words. It is front-loaded and appropriately sized for a tool with no parameters, making it highly efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (0 parameters, no output schema) and rich annotations, the description is adequate but minimal. It covers the basic action but lacks details on output format or usage context, which could be helpful despite annotations. It meets minimum viability but doesn't fully leverage the opportunity for completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0 parameters and 100% schema description coverage, the baseline is high. The description doesn't need to explain parameters, as there are none. It efficiently focuses on the tool's function without redundancy, earning a score above the minimum viable level.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('returns') and resource ('all network requests since loading the page'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'browser_console_messages' or 'browser_snapshot' that might also capture network-related data, though the distinction is somewhat implied by the specific focus on network requests.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing a loaded page), exclusions, or compare it to siblings like 'browser_console_messages' for other browser data. The context is implied but not explicitly stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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/maywzh/playwright-mcp'

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