Skip to main content
Glama

wc_disconnect

Terminate an active WalletConnect session to end wallet connectivity. Requires new pairing for subsequent reconnection.

Instructions

Disconnect the active WalletConnect session. After disconnecting, a new pairing must be initiated to reconnect.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
wallet_idNoTarget wallet ID. Required for multi-wallet sessions; auto-resolved when session has a single wallet.

Implementation Reference

  • The tool handler for 'wc_disconnect', which calls the '/v1/wallet/wc/session' endpoint via the apiClient.
    async (args) => {
      const params = new URLSearchParams();
      if (args.wallet_id) params.set('walletId', args.wallet_id);
      const qs = params.toString();
      const result = await apiClient.delete('/v1/wallet/wc/session' + (qs ? '?' + qs : ''));
      return toToolResult(result);
    },
  • The registration function 'registerWcDisconnect' that defines the MCP tool structure and handler.
    export function registerWcDisconnect(
      server: McpServer,
      apiClient: ApiClient,
      walletContext?: WalletContext,
    ): void {
      server.tool(
        'wc_disconnect',
        withWalletPrefix(
          'Disconnect the active WalletConnect session. After disconnecting, a new pairing must be initiated to reconnect.',
          walletContext?.walletName,
        ),
        {
          wallet_id: z.string().optional().describe('Target wallet ID. Required for multi-wallet sessions; auto-resolved when session has a single wallet.'),
        },
        async (args) => {
          const params = new URLSearchParams();
          if (args.wallet_id) params.set('walletId', args.wallet_id);
          const qs = params.toString();
          const result = await apiClient.delete('/v1/wallet/wc/session' + (qs ? '?' + qs : ''));
          return toToolResult(result);
        },
      );
    }
Behavior4/5

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

No annotations provided, so description carries full burden. Discloses the session termination and reconnection requirement clearly. Lacks details on return values, error states (e.g., if no active session), or whether this affects multi-wallet sessions differently.

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?

Two sentences with zero waste. First sentence states the action; second states the critical post-condition. Every element earns its place.

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?

Appropriate for a single-parameter state-change tool with no output schema. Covers the essential post-condition (reconnection requirement). Could mention return value or error conditions (e.g., no active session to disconnect).

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 has 100% coverage for the single optional parameter (`wallet_id`), establishing baseline 3. Description adds no parameter-specific guidance, though the schema adequately documents the auto-resolution behavior.

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

Purpose5/5

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

Clear specific verb (Disconnect) + resource (WalletConnect session). Naturally distinguishes from sibling `wc_connect` (which initiates) and `wc_status` (which queries).

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

Usage Guidelines4/5

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

Provides critical consequence context: 'new pairing must be initiated to reconnect' implies when to use (when termination is intended) and the cost of using it. Could explicitly contrast with `wc_status` for querying instead of terminating.

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/minhoyoo-iotrust/WAIaaS'

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