Skip to main content
Glama
BrowserGenie

BrowserGenie MCP Server

by BrowserGenie

get_network_request_detail

Retrieve detailed information about a specific network request, including headers and optional response body, using the request ID from network logs.

Instructions

Get detailed information about a specific network request, including headers and optionally the response body

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestIdYesThe request ID from get_network_logs
includeBodyNoInclude response body (default: false)
tabIdNoTarget tab ID (defaults to active tab)
apiKeyNoAPI key for authentication

Implementation Reference

  • The tool 'get_network_request_detail' is registered via server.tool() with its schema (requestId, includeBody, tabId, apiKey) and handler that sends the command via the WebSocket bridge.
    server.tool(
      'get_network_request_detail',
      'Get detailed information about a specific network request, including headers and optionally the response body',
      {
        requestId: z.string().describe('The request ID from get_network_logs'),
        includeBody: z.boolean().optional().describe('Include response body (default: false)'),
        tabId: z.number().optional().describe('Target tab ID (defaults to active tab)'),
        apiKey: z.string().optional().describe('API key for authentication'),
      },
      async ({ requestId, includeBody, tabId, apiKey }) => {
        const result = await bridge.sendCommand({
          command: 'get_network_request_detail',
          params: { requestId, includeBody },
          tabId,
          apiKey,
        });
        if (!result.success) {
          return { content: [{ type: 'text', text: `Error: ${result.error?.message}` }], isError: true };
        }
        return { content: [{ type: 'text', text: JSON.stringify(result.data, null, 2) }] };
      }
    );
  • Input schema definition for the tool: requestId (required string), includeBody (optional boolean), tabId (optional number), apiKey (optional string).
    {
      requestId: z.string().describe('The request ID from get_network_logs'),
      includeBody: z.boolean().optional().describe('Include response body (default: false)'),
      tabId: z.number().optional().describe('Target tab ID (defaults to active tab)'),
      apiKey: z.string().optional().describe('API key for authentication'),
    },
  • The handler function that executes the tool logic: sends a bridge command with command='get_network_request_detail' and params {requestId, includeBody}, then returns the result as JSON text.
    async ({ requestId, includeBody, tabId, apiKey }) => {
      const result = await bridge.sendCommand({
        command: 'get_network_request_detail',
        params: { requestId, includeBody },
        tabId,
        apiKey,
      });
      if (!result.success) {
        return { content: [{ type: 'text', text: `Error: ${result.error?.message}` }], isError: true };
      }
      return { content: [{ type: 'text', text: JSON.stringify(result.data, null, 2) }] };
    }
  • Import of registerDevtoolsNetworkTools from devtools-network.ts, called at line 41 to register all devtools network tools including get_network_request_detail.
    import { registerDevtoolsNetworkTools } from './devtools-network.js';
  • The WebSocketBridge.sendCommand() method used by the handler to forward the command to the Chrome extension via WebSocket.
    async sendCommand(cmd: BridgeCommand): Promise<BridgeResponse> {
      if (!this.isConnected()) {
        return {
          success: false,
          error: {
            code: 'NOT_CONNECTED',
            message: 'Chrome extension is not connected. Ensure the extension is installed, enabled, and the browser is running.',
          },
        };
      }
    
      const id = crypto.randomUUID();
      const timeout = cmd.timeout ?? DEFAULT_TIMEOUT;
    
      return new Promise<BridgeResponse>((resolve, reject) => {
        const timer = setTimeout(() => {
          this.pending.delete(id);
          resolve({
            success: false,
            error: {
              code: 'TIMEOUT',
              message: `Command '${cmd.command}' timed out after ${timeout}ms`,
            },
          });
        }, timeout);
    
        this.pending.set(id, { resolve, reject, timer });
    
        const message = {
          id,
          type: 'request',
          command: cmd.command,
          params: cmd.params,
          tabId: cmd.tabId,
          apiKey: cmd.apiKey,
          timestamp: Date.now(),
        };
    
        this.client!.send(JSON.stringify(message));
      });
    }
Behavior3/5

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

Description adds that the tool returns headers and optionally the response body, but does not disclose important behavioral traits such as authentication requirement (apiKey), potential volatility of network requests, or whether the tab must be active. Given no annotations, more transparency would be beneficial.

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?

Single concise sentence of 15 words, front-loaded with key information. No redundancy or filler.

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?

With 4 parameters, no output schema, and no annotations, the description is adequate but incomplete. It mentions headers and body but omits other potential return fields (status, timing). Also does not address required apiKey or tabId, leaving gaps for agent understanding.

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

Parameters3/5

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

Schema coverage is 100% with all parameters described. The description adds no additional parameter meaning beyond the schema, mentioning 'headers' and 'response body' which correspond to the requestId and includeBody parameters, but no new semantics.

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

Purpose5/5

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

Description clearly states the verb 'Get' and resource 'detailed information about a specific network request', including headers and optionally response body. It effectively distinguishes from siblings like 'get_network_logs' (lists all requests) and 'assert_network_request_made' (checks existence).

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?

No explicit guidance on when or when not to use this tool compared to alternatives. For instance, it does not contrast with 'get_network_logs' or 'get_network_errors'. The description implies its use but lacks direct usage context.

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/BrowserGenie/mcp'

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