Skip to main content
Glama

thaw_account

Unfreeze a frozen token account on Solana to restore transfer functionality using wallet authority, token mint, and account address.

Instructions

Thaw a frozen token account to allow transfers

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
walletNameYesName of the wallet with freeze authority
tokenMintYesToken mint address
accountAddressYesAddress of the token account to thaw

Implementation Reference

  • The main handler function that performs the thaw operation on a token account using the SPL token library's thawAccount function. It validates the wallet, sets up the connection, and returns the transaction signature.
    async function handleThawAccount(args: any) {
      const { walletName, tokenMint, accountAddress } = args;
    
      const wallet = wallets.get(walletName);
      if (!wallet) {
        throw new Error(`Wallet '${walletName}' not found`);
      }
    
      ensureConnection();
      const tokenMintPubkey = new PublicKey(tokenMint);
      const accountPubkey = new PublicKey(accountAddress);
    
      const signature = await thawAccount(
        connection,
        wallet.keypair,
        accountPubkey,
        tokenMintPubkey,
        wallet.keypair
      );
    
      return {
        success: true,
        signature,
        accountAddress,
        explorerUrl: `https://explorer.solana.com/tx/${signature}?cluster=${currentNetwork}`
      };
    }
  • The input schema defining the parameters for the thaw_account tool: walletName, tokenMint, and accountAddress.
    {
      name: "thaw_account",
      description: "Thaw a frozen token account to allow transfers",
      inputSchema: {
        type: "object",
        properties: {
          walletName: {
            type: "string",
            description: "Name of the wallet with freeze authority"
          },
          tokenMint: {
            type: "string",
            description: "Token mint address"
          },
          accountAddress: {
            type: "string",
            description: "Address of the token account to thaw"
          }
        },
        required: ["walletName", "tokenMint", "accountAddress"]
      }
    },
  • src/index.ts:1342-1344 (registration)
    Registration in the tool dispatch switch statement that routes calls to the handleThawAccount handler.
    case "thaw_account":
      result = await handleThawAccount(args);
      break;
  • src/index.ts:1273-1275 (registration)
    The tools array (including thaw_account) is returned in the ListToolsRequest handler, registering the tool for discovery.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return { tools };
    });
  • Import of the thawAccount function from @solana/spl-token library, used as the core utility in the handler.
    import {
      createTransferInstruction,
      getAssociatedTokenAddress,
      createAssociatedTokenAccountInstruction,
      getAccount,
      createMint,
      mintTo,
      burn,
      freezeAccount,
      thawAccount,

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/ExpertVagabond/solana-mcp-server'

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