read_live_capture
Read incremental network traffic from Charles Proxy captures to monitor real-time HTTP/HTTPS requests with compact summaries (host/method/path/status). Advances cursor automatically for new entries only.
Instructions
Read incremental traffic and advance the cursor. Returns compact entry summaries (host/method/path/status only). Use query_live_capture_entries for structured filtering instead of this tool. This tool advances the internal cursor — repeated calls only return new items.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| capture_id | Yes | ||
| cursor | No | ||
| limit | No |
Implementation Reference
- charles_mcp/tools/live.py:80-100 (handler)The handler function 'read_live_capture' is defined in 'charles_mcp/tools/live.py' using the @mcp.tool() decorator. It uses 'live_service' to read capture data and '_compact_read_result' to format the output.
@mcp.tool() async def read_live_capture( ctx: ToolContext, capture_id: str, cursor: Optional[int] = None, limit: int = 50, ) -> LiveCaptureReadResult: """Read incremental traffic and advance the cursor. Returns compact entry summaries (host/method/path/status only). Use query_live_capture_entries for structured filtering instead of this tool. This tool advances the internal cursor — repeated calls only return new items.""" deps = get_tool_dependencies(ctx) try: result = await deps.live_service.read( capture_id, cursor=cursor, limit=limit, ) return _compact_read_result(result) except Exception as exc: raise ValueError(str(exc)) from exc