Skip to main content
Glama

get_websocket_messages

Read-only

Inspect captured WebSocket connections and frame payloads for live-update, streaming, and realtime message flows. Use direction, analysis, and group features to discover message patterns.

Instructions

Inspect captured bidirectional WebSocket connections and frame payloads for the selected page. Use this for WebSocket, socket, live-update, push, streaming, or realtime message flows; use list_network_requests for ordinary HTTP/XHR/fetch traffic and WebSocket upgrade request headers. WebSocket capture starts lazily on this tool's first use and is not retroactive: if the relevant socket already connected or exchanged frames, call this tool once to initialize capture, then reload or reproduce the flow. Without wsid it lists connections so you can choose one. With wsid it lists paginated sent/received frames; add show_content=true for payload previews. With wsid and analyze=true it groups frames by payload pattern and returns group IDs and sample frame indices; then use groupId to inspect one pattern. With wsid and frameIndex it returns one retained frame's detailed payload using the stable index shown in frame tables or analysis samples.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
wsidNoSelect a WebSocket connection by the wsid returned from connection-list mode. Omit it to list captured connections before inspecting their frames.
analyzeNoWith wsid, group retained frames by payload pattern/fingerprint. Use this to discover message types in noisy realtime traffic; it returns traffic statistics, group IDs, and sample stable frame indices. Follow with groupId or frameIndex for focused inspection.
groupIdNoWith wsid, list only frames from a pattern group such as A, B, or C. Run analyze=true first to discover group IDs. If analysis used direction, repeat the same direction because grouping is computed over that filtered frame set.
pageIdxNoZero-based page for the active connection-list, frame-list, group-list, or analysis-group mode. Omit it for the first page.
pageSizeNoItems per page: connections when wsid is omitted, frames in normal/group mode, or pattern groups when analyze=true. Defaults to 10.
directionNoWith wsid, restrict frame-list, analysis, or group results to frames "sent" by the page or "received" from the server. It does not filter connection-list mode.
urlFilterNoIn connection-list mode only (without wsid), return WebSocket URLs containing this substring. Use it to narrow by host, path, or query text.
frameIndexNoWith wsid, return one retained frame and its payload by stable frame index. This is the Idx shown in frame tables or analyze=true samples, not a page-relative array offset. Indices are monotonic and may begin above 0 after older frames are evicted.
show_contentNoWith wsid in normal or group frame-list mode, include payload previews up to 10,000 characters for frames on the current page. Leave false for compact metadata, or use frameIndex when one exact frame needs detailed inspection.
includePreservedConnectionsNoIn connection-list mode only (without wsid), include connections preserved from the last three navigations. Use this when the relevant socket belonged to a previous page state.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYesWhether the tool completed successfully.
dataNo
toolYesStable MCP tool name.
errorNo
summaryYesConcise human-readable outcome.
Behavior5/5

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

Beyond readOnlyHint and destructiveHint annotations, the description discloses key behaviors: lazy capture start, non‑retroactivity, stable frame indices, monotonic but non‑zero starting indices, and eviction of old frames. This adds substantial value over annotations alone.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single dense paragraph covering all modes and behaviours. While efficient, it could benefit from breaking into bullet points or sections for easier scanning. Still, it earns its place with no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 10 parameters, multiple modes, and the existence of an output schema, the description is fully complete. It covers initialisation, pagination, filtering, analysis mode, frame indices, and preservation of connections across navigations. No gaps remain.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but the description adds operational meaning: explaining mode combinations (e.g., without wsid lists connections, with wsid lists frames, with analyze=true groups frames). Clarifies that frameIndex is stable, not page‑relative, and that direction filters but does not apply in connection‑list mode.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool inspects captured bidirectional WebSocket connections and frame payloads. It names the resource (WebSocket messages) and accurately contrasts with sibling tool list_network_requests for ordinary HTTP traffic.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit when to use (WebSocket, socket, live-update, etc.) and when not (use list_network_requests for HTTP/XHR/fetch). Details initialisation caveat (lazy capture, not retroactive) and mode switching between connection listing and frame inspection.

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/zhizhuodemao/js-reverse-mcp'

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