Skip to main content
Glama

get_network_capture_status

Check active network capture status, duration, and statistics to monitor progress or verify if capture is running before stopping.

Instructions

Get the current status of network capture for a session. Returns whether capture is active, duration, current statistics, and capture options. Useful for monitoring capture progress or checking if capture is running before stopping.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdYesSession ID obtained from initialize_session

Implementation Reference

  • The main handler function that retrieves the current status of network capture for the given session ID, including whether it's active, duration, stats, and options.
    export async function getNetworkCaptureStatus(sessionId) {
      const session = global.activeSessions?.get(sessionId);
      if (!session) {
        throw new Error(`Session ${sessionId} not found.`);
      }
    
      const captureData = session.networkCapture;
      if (!captureData) {
        return {
          sessionId,
          status: "inactive",
          message: "No active network capture session",
        };
      }
    
      const duration = Date.now() - captureData.startTime;
    
      return {
        sessionId,
        status: "active",
        startTime: new Date(captureData.startTime).toISOString(),
        duration,
        currentStats: {
          requests: captureData.requests.length,
          responses: captureData.responses.length,
          wsFrames: captureData.wsFrames.length,
          streamingResponses: captureData.streamingResponses.length,
        },
        options: captureData.options,
      };
    }
  • Input schema definition for the get_network_capture_status tool in the ListTools response.
    {
      name: "get_network_capture_status",
      description:
        "Get the current status of network capture for a session. Returns whether capture is active, duration, current statistics, and capture options. Useful for monitoring capture progress or checking if capture is running before stopping.",
      inputSchema: {
        type: "object",
        properties: {
          sessionId: {
            type: "string",
            description: "Session ID obtained from initialize_session",
          },
        },
        required: ["sessionId"],
      },
    },
  • src/index.js:579-588 (registration)
    Registration of the tool handler in the switch statement within the CallToolRequest handler.
    case "get_network_capture_status": {
      const { sessionId } = args;
      if (!sessionId) {
        throw new McpError(
          ErrorCode.InvalidParams,
          "sessionId parameter is required"
        );
      }
      result = await getNetworkCaptureStatus(sessionId);
      break;
  • Re-export of the getNetworkCaptureStatus function from networkCapture.js to centralize imports.
    export {
      startNetworkCapture,
      stopNetworkCapture,
      getNetworkCaptureStatus,
      clearNetworkCapture,
    } from "./networkCapture.js";
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes what the tool returns ('whether capture is active, duration, current statistics, and capture options'), which adds useful context beyond the input schema. However, it doesn't cover potential errors, permissions, or rate limits, leaving gaps in behavioral understanding for a tool with no annotation support.

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 appropriately sized and front-loaded: the first sentence states the core purpose, and the second adds usage context. Every sentence earns its place by providing essential information without redundancy or fluff, making it efficient and easy to parse.

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?

Given the tool's moderate complexity (status retrieval with one parameter) and no annotations or output schema, the description does a good job of explaining what the tool does and when to use it. It covers the return values in detail, compensating for the lack of output schema. However, it could improve by mentioning error cases or dependencies, keeping it from a perfect score.

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?

The input schema has 100% description coverage, with the single parameter 'sessionId' well-documented as 'Session ID obtained from initialize_session'. The description doesn't add any parameter-specific details beyond this, as it focuses on the tool's purpose and output. According to the rules, with high schema coverage, the baseline is 3 even without param info in the description.

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 tool's purpose: 'Get the current status of network capture for a session.' It specifies the verb ('Get') and resource ('status of network capture'), and distinguishes it from siblings like start_network_capture and stop_network_capture by focusing on status retrieval rather than control. However, it doesn't explicitly differentiate from get_current_page_info or other monitoring tools, keeping it from a perfect score.

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?

The description provides clear context for usage: 'Useful for monitoring capture progress or checking if capture is running before stopping.' This implies when to use it (during monitoring or before stopping capture) and hints at alternatives (e.g., use before stop_network_capture). However, it lacks explicit exclusions or comparisons to other status-checking tools like get_current_page_info, so it doesn't fully meet the highest standard.

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/pyscout/webscout-mcp'

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