get_websocket_frames
Retrieve sent and received WebSocket frames for a connection using its requestId, including connection state, to inspect or debug live message traffic.
Instructions
Get the frames (messages) of a WebSocket connection. The requestId comes from list_requests (entries with resourceType "WebSocket"). Returns the connection state plus sent/received frames. Requires network_enable to have been active when the connection opened. Use get_request_details on the same requestId for the handshake headers.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"requestId": "<requestId>"
},
"name": "get_websocket_frames"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Return only the most recent N frames after filtering | |
| since | No | Only frames with a CDP timestamp greater than this (for incremental polling) | |
| contains | No | Only frames whose payload contains this substring | |
| targetId | No | Owning targetId. Optional; resolved automatically when omitted. | |
| direction | No | Only frames in this direction | |
| requestId | Yes | WebSocket connection requestId from list_requests |