Skip to main content
Glama

Validate a WebSocket URL

validate_websocket_url
Read-onlyIdempotent

Validate and parse a ws:// or wss:// URL into its components, and optionally decode a WebSocket close code.

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": "validate_websocket_url"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYes
explainCloseCodeNo

Output Schema

NameRequiredDescriptionDefault
hostNo
pathNo
portNo
errorNo
validYes
secureNo
protocolNo
closeCodeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  2. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint=false, so safety behavior is covered structurally. The description adds that the URL is decomposed into components and that close-code decoding is optional, but says nothing about invalid-URL behavior or the shape of a successful parse (excused partly by the output schema).

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?

A single front-loaded sentence with the primary action first and the optional secondary capability last. No filler or redundant restatement of the title.

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?

For a two-parameter read-only validator with an output schema covering return values, the description is nearly sufficient: purpose, input format and the optional close-code feature are stated. The remaining gap is usage guidance rather than missing essential behavioral detail.

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 description coverage is 0%, so both parameters are undocumented in the schema. The description compensates for one of them by explaining that a WebSocket close code can optionally be decoded, but it never names explainCloseCode, its 1000-4999 range, or the url constraint, leaving the agent to infer the mapping.

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 specific verbs (validate, parse) and a specific resource (ws:// or wss:// URL), plus the secondary capability of decoding a close code. It clearly distinguishes this from a generic URL parser by naming the WebSocket schemes, though it doesn't explicitly contrast with sibling url_codec.

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?

The description never says when an agent should pick this over alternatives such as url_codec or check_ssl, nor does it state prerequisites or what conditions make validation fail. Usage is only implied by the scheme names.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.