Skip to main content
Glama

ws_connect

Opens a persistent WebSocket connection using headers and cookies from the active environment, returning a connectionId you can reuse for sending and receiving messages.

Instructions

Open a persistent WebSocket connection, backed by headers and cookies from active environment. Returns connectionId.

Input Schema

NameRequiredDescriptionDefault
urlYesws:// or wss:// URL (can be path if base URL matches)
headersNo
timeoutNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.4

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already disclose that this is a non-read-only, open-world, non-idempotent operation. The description adds useful context beyond that: the connection is persistent and is backed by headers and cookies from the active environment. It stops short of explaining timeout behavior or connection lifecycle constraints.

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

Conciseness5/5

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

The description is two short sentences with zero waste, front-loading the action and then the return value. Every sentence earns its place.

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?

It is complete enough to make the basic call because the required url parameter is documented in the schema and the return value is named. However, for a persistent connection tool it omits important lifecycle context such as when to close the connection, what timeout does, and how the connection interacts with ws_send/ws_read.

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 description coverage is only 33%, so the description must carry more weight, but it says nothing about the optional headers object or the timeout parameter. Its mention of environment-backed headers and cookies may even be confused with the explicit headers parameter, and it does not clarify timeout semantics.

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?

The description states a specific verb and resource: 'Open a persistent WebSocket connection,' and adds that it returns a connectionId. This clearly separates it from ws_send, ws_read, ws_close, and ws_list by action, though it does not explicitly call out those siblings as alternatives.

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?

Usage is implied: opening a connection naturally precedes ws_send/ws_read and should pair with ws_close, but the description never states when to use this tool versus those siblings. There is no explicit when-not guidance or lifecycle instruction.

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