Skip to main content
Glama

get_network_capture_status

Check current network capture status to monitor progress, view statistics, and verify if capture is active before stopping a session.

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 core handler function that implements the getNetworkCaptureStatus tool logic. It retrieves the session from global active sessions, checks for network capture data, and returns the current status including stats and options if active, or inactive status.
    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, }; }
  • The MCP tool schema definition including name, description, and input schema requiring a sessionId parameter.
    { 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-589 (registration)
    The dispatch logic in the MCP CallToolRequest handler that validates the sessionId argument and calls the getNetworkCaptureStatus function.
    case "get_network_capture_status": { const { sessionId } = args; if (!sessionId) { throw new McpError( ErrorCode.InvalidParams, "sessionId parameter is required" ); } result = await getNetworkCaptureStatus(sessionId); break; }

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