Skip to main content
Glama
gagarinyury

MCP Bitget Trading Server

by gagarinyury

getWebSocketStatus

Check WebSocket connection status for real-time cryptocurrency trading data on Bitget exchange. Monitor connectivity to ensure continuous market updates and order execution.

Instructions

Get WebSocket connection status

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler for the getWebSocketStatus tool. It calls helper methods on the WebSocket client to get connection status and subscription count, then returns them as JSON.
    case 'getWebSocketStatus': {
      const status = {
        connected: this.wsClient.isWebSocketConnected(),
        subscriptions: this.wsClient.getSubscriptionCount(),
      };
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(status, null, 2),
          },
        ],
      } as CallToolResult;
    }
  • src/server.ts:294-302 (registration)
    Registration of the getWebSocketStatus tool in the listTools handler, including name, description, and empty input schema.
    {
      name: 'getWebSocketStatus',
      description: 'Get WebSocket connection status',
      inputSchema: {
        type: 'object',
        properties: {},
        required: []
      },
    },
  • Helper method that returns the current WebSocket connection status (boolean). Used by the tool handler.
    isWebSocketConnected(): boolean {
      return this.isConnected;
    }
  • Helper method that returns the number of active WebSocket subscriptions. Used by the tool handler.
    getSubscriptionCount(): number {
      return this.subscriptions.size;
    }
  • Input schema for getWebSocketStatus tool (no parameters required). Defined inline in registration.
      inputSchema: {
        type: 'object',
        properties: {},
        required: []
      },
    },
Behavior2/5

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

With no annotations, the description carries full burden but only states the basic action. It lacks behavioral details such as whether this is a read-only operation, what data is returned (e.g., boolean status, detailed metrics), error conditions, or performance implications. This is inadequate for a tool with zero annotation coverage.

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 a single, clear sentence with no wasted words, making it highly concise and front-loaded. Every word earns its place by directly conveying the tool's purpose without redundancy or unnecessary elaboration.

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?

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what 'status' entails (e.g., connection state, error messages, timestamps), return format, or how it integrates with sibling tools like 'connectWebSocket'. For a tool in a WebSocket context with behavioral unknowns, more detail is needed.

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

Parameters4/5

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

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description doesn't add parameter details, which is appropriate, but it also doesn't compensate for any gaps since there are none. A baseline of 4 is applied as it meets the requirement for a zero-parameter tool.

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 clearly states the action ('Get') and resource ('WebSocket connection status'), making the purpose immediately understandable. However, it doesn't differentiate from siblings like 'connectWebSocket' or 'disconnectWebSocket' by specifying what aspects of status are returned (e.g., connection state, latency, session details).

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?

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., requires an established WebSocket connection), exclusions, or relationships to siblings like 'connectWebSocket' for initiating connections or 'disconnectWebSocket' for terminating them.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gagarinyury/MCP-bitget-trading'

If you have feedback or need assistance with the MCP directory API, please join our Discord server