get_socket_messages
Read the messages of one WebSocket. Sockets appear in get_network as rows of type WebSocket with counts (filter with type:"WebSocket"); capture starts with the first get_network or arm_network call on the tab, so open or reload the page after that. Returns the newest matching messages with direction (sent or received) and a running number n; pass after:<last_n> to read only what arrived since. Binary messages are base64.
Example#
Call this MCP tool with the argument object below. Replace illustrative IDs, selectors, local paths, and project URLs with values observed in your session.
{
"id": "SOCKET_ID_FROM_GET_NETWORK",
"direction": "received",
"limit": 20
}Result#
Returns the socket's address, whether it is still open, totals for sent and received messages, and the newest matching messages with direction, kind, time and data. last_n can be passed back as after to read only newer messages.
Results arrive in MCP content blocks. Most structured results are JSON in text blocks; image tools can include image blocks. Handle errors and partial or truncated data. No formal output schema is declared for this tool.
Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The WebSocket's id from get_network |
direction | "sent" / "received" | No | See usage and full schema below. |
contains | string | No | Only messages containing this text |
after | integer | No | Only messages numbered above this (last_n from an earlier call) minimum: -9007199254740991; maximum: 9007199254740991 |
limit | integer | No | Most messages returned, default 50 minimum: 1; maximum: 200 |
max_chars | integer | No | Most characters per message, default 2000 minimum: 1; maximum: 20000 |
tab | string | No | Tab name or id in your workspace; does not change the visible tab. minLength: 1 |
Full input schema#
The schema includes nested shapes and constraints. Additional semantic constraints can apply at runtime; read the description and usage notes.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The WebSocket's id from get_network"
},
"direction": {
"type": "string",
"enum": [
"sent",
"received"
]
},
"contains": {
"description": "Only messages containing this text",
"type": "string"
},
"after": {
"description": "Only messages numbered above this (last_n from an earlier call)",
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"limit": {
"description": "Most messages returned, default 50",
"type": "integer",
"minimum": 1,
"maximum": 200
},
"max_chars": {
"description": "Most characters per message, default 2000",
"type": "integer",
"minimum": 1,
"maximum": 20000
},
"tab": {
"description": "Tab name or id in your workspace; does not change the visible tab.",
"type": "string",
"minLength": 1
}
},
"required": [
"id"
],
"additionalProperties": false
}Related documentation#
Reference conventions · Agent operating guide · Troubleshooting