Skip to main content
Glama

inspect_networkDump

Read-only

Debug API calls by dumping captured network logs. Filter traffic by URL substring and optionally include JSON response bodies to analyze complete request data and diagnose issues.

Instructions

Dump captured network log. Pass bodies:true to include response bodies (JSON APIs). Waits up to 3s for pending body fetches.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodiesNoInclude response bodies for API calls
url_filterNoFilter entries by URL substring

Implementation Reference

  • The main handler for 'inspect.networkDump' tool. It retrieves captured network entries from the networkCaptures map, filters by URL if specified, optionally fetches response bodies via CDP Network.getResponseBody, and returns the captured network entries.
    case 'inspect.networkDump': {
      const capture = networkCaptures.get(tabId)
      if (!capture) return { entries: [] }
      // Wait briefly for in-flight requests to complete
      await new Promise(r => setTimeout(r, Math.min(params.wait_ms || 500, 3000)))
      const entries = capture.entries.filter(e => {
        if (params.url_filter && !e.url?.includes(params.url_filter)) return false
        return true
      })
      // Optionally fetch response bodies
      if (params.bodies) {
        for (const entry of entries) {
          if (!entry.requestId || entry.responseBody !== undefined) continue
          try {
            const body = await chrome.debugger.sendCommand({ tabId }, 'Network.getResponseBody', { requestId: entry.requestId })
            entry.responseBody = body?.body?.substring(0, 10000) || ''
          } catch { /* body not available */ }
        }
      }
      return { count: entries.length, entries }
    }
  • Tool capability registration where 'inspect.networkDump' is listed as a supported tool in the capabilities response.
    'tab.new', 'tab.list', 'tab.close',
    'inspect.page', 'inspect.networkStart', 'inspect.networkDump', 'inspect.networkStop',
    'intercept.on', 'intercept.off'
  • CDP Network Event Listener that captures network responses when network capturing is active. Filters for API-like requests (JSON, XML) and stores them in the networkCaptures map for later retrieval by inspect.networkDump.
    // --- CDP Network Event Listener (for inspect.networkStart/networkDump) ---
    
    chrome.debugger.onEvent.addListener((source, method, params) => {
      const tabId = source.tabId
      const capture = networkCaptures.get(tabId)
      if (!capture?.listening) return
    
      if (method === 'Network.responseReceived') {
        const { response, requestId } = params
        if (!response?.url) return
        // Only capture API-like requests (JSON, XHR, fetch)
        const ct = response.headers?.['content-type'] || response.headers?.['Content-Type'] || ''
        const isApi = ct.includes('json') || ct.includes('xml') || response.mimeType?.includes('json')
        const isDoc = ct.includes('html') || ct.includes('css') || ct.includes('javascript') || ct.includes('image') || ct.includes('font')
        if (isDoc && !isApi) return
        capture.entries.push({
          url: response.url,
          method: params.type || 'GET',
          status: response.status,
          type: response.mimeType || ct.split(';')[0],
          requestId,
        })
      }
    })
Behavior4/5

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

Annotations declare readOnlyHint=true and destructiveHint=false. Description adds critical behavioral details not in annotations: the 3-second wait for pending fetches and the JSON API specificity for body content. No contradiction with safety 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?

Three sentences with zero waste: purpose declaration, parameter guidance, and timing/behavioral constraint. Front-loaded with the core action and appropriately dense.

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

Completeness4/5

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

Complete for a diagnostic read-only tool with simple parameters. Captures the essential behavioral quirk (3s wait). Minor gap: could explicitly mention prerequisite relationship to inspect_networkStart, though 'captured' implies this.

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?

Schema has 100% coverage, establishing baseline 3. Description adds valuable context beyond schema: clarifying that bodies parameter is particularly relevant for 'JSON APIs' and providing imperative syntax example ('Pass bodies:true').

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?

Specific verb 'Dump' + resource 'captured network log' clearly defines the operation. The word 'captured' effectively distinguishes this from sibling inspect_networkStart (which likely initiates capture), establishing the workflow sequence.

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

Usage Guidelines4/5

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

Provides explicit usage guidance for the bodies parameter ('Pass bodies:true to include response bodies') and notes the 3-second wait behavior. Lacks explicit 'when not to use' or alternative naming, but implies prerequisite that capture must already be running via 'captured'.

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/LeonTing1010/tap'

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