Skip to main content
Glama

ws_close

Close an active WebSocket connection by its connection ID to end the session and release resources.

Instructions

Close connection.

Input Schema

NameRequiredDescriptionDefault
connectionIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.4

TDQS

C2.4/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full disclosure burden and delivers almost none: nothing about whether this is idempotent, what happens to in-flight or buffered messages, what error an unknown/closed connectionId produces, or that it is destructive to the session state.

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

Conciseness3/5

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

Two words, zero waste and front-loaded, but this is brevity by omission rather than tight writing. It is appropriately sized only for a tool whose behavior needs no explanation, which is not the case here.

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

Completeness2/5

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

A state-changing lifecycle tool with no annotations, no output schema, and an undocumented required parameter. An agent cannot tell whether closing is reversible, whether it frees the connectionId for reuse, or what a success response looks like.

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?

The single required parameter connectionId has 0% schema description coverage, and the description adds nothing about it — not where the ID comes from (presumably ws_connect or ws_list), nor whether it is a local handle or a server-side identifier.

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

Purpose3/5

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

"Close connection" names a specific verb and object, which is enough to identify it as the teardown counterpart of ws_connect. However it never says which kind of connection (WebSocket) or scopes it against siblings like ws_list/ws_read, so the purpose is only inferable from the name itself.

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

Usage Guidelines2/5

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

There is no guidance on when to call this versus simply letting a session lapse, no prerequisite (must ws_connect first), and no mention of what to do with an unread buffer before closing. The agent must guess the lifecycle rules.

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