Skip to main content
Glama

websocket_connect

Connects to a WebSocket endpoint, optionally sends messages, waits for responses, then closes. Use it to test WebSocket APIs stored in Insomnia.

Instructions

Connect to a WebSocket endpoint, optionally send messages, wait for responses, then close. Useful for testing WS APIs stored in Insomnia.

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": {
      "url": "<url>"
    },
    "name": "websocket_connect"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesWebSocket URL, e.g. wss://api.example.com/ws
headersNo
messagesNoMessages to send after connecting
confirmedNoSet to true to confirm sending to an external URL after reviewing it
timeout_msNo
wait_for_messagesNoNumber of messages to collect before closing

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.6-beta

TDQS

B3.4/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 the connect/send/wait/close lifecycle, which is real behavioral context. However it says nothing about the external-URL confirmation gate, what happens on timeout, or whether the connection is always closed even on failure — meaningful traits for a networked, side-effecting tool left to the schema 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?

Two tight sentences with the lifecycle front-loaded and no filler. The trailing Insomnia sentence is useful framing rather than padding, though it could have been spent on a more actionable constraint.

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

Completeness3/5

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

There is no output schema and no annotations, so the description should tell the agent what comes back from a call — collected messages, status, errors. For a 6-parameter networked tool with nested objects, the lifecycle summary alone is only adequate, not complete.

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

Parameters3/5

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

Schema coverage is 67%, so the description is not fully off the hook. It adds that messages are sent after connecting and that responses are awaited and collected, loosely mapping to messages and wait_for_messages, but it never explains timeout_ms, headers, or the confirmed safety flag.

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 ('Connect to a WebSocket endpoint') and enumerates the full lifecycle: send messages, wait for responses, close. An agent can distinguish this from the HTTP request-oriented siblings without opening the schema, though it never explicitly names a contrasting alternative.

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?

Provides one positive use case ('testing WS APIs stored in Insomnia') but gives no when-not guidance, no prerequisites, and no alternative to consider for non-WebSocket or non-testing scenarios. Usage is implied rather than prescribed.

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