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);
        },
      );
    }

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