Skip to main content
Glama

ws_read

Read buffered WebSocket messages from a connection and optionally wait for a regex pattern to arrive, enabling verification of real-time events during API tests.

Instructions

Read the latest buffered messages. Can wait for specific regex pattern to arrive.

Input Schema

NameRequiredDescriptionDefault
limitNo
timeoutNo
connectionIdYes
waitForPatternNoWait for specific message to be logged

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.4

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose genuinely useful behavior — messages are buffered and a read can block waiting for a pattern — but it omits whether reading drains or preserves the buffer, what timeout does by default, or how it fails on a closed/missing connection.

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?

Two short sentences with the primary action front-loaded and the optional wait mode second. No waste, though the terseness leaves little room for the missing behavioral detail.

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

Completeness4/5

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

Placeholder check: this should be lower. For a 4-parameter, no-annotation, no-output-schema tool, the description says nothing about return shape (array of messages? count? empty result?), timeout semantics, or buffer-consumption behavior — substantial gaps an agent needs filled before calling it.

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

Parameters2/5

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

Schema coverage is only 25%, and the one documented parameter (waitForPattern) is the only one the description touches. limit, timeout, and the required connectionId get no added meaning — no units for timeout, no cap semantics for limit, no source for connectionId.

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

Purpose4/5

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

States a specific verb and resource: 'Read the latest buffered messages', with the added capability of waiting for a regex pattern. It reads as a message-consumption tool distinct from ws_send/ws_close/ws_list, though it never names those siblings to sharpen the distinction.

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

Usage Guidelines3/5

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

Use is implied rather than stated: read buffered messages, optionally blocking until a pattern arrives. There is no guidance on when to prefer this over ws_list, when to use the wait mode versus a plain poll, or what the required connectionId should come from (ws_connect/ws_list).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.