Skip to main content
Glama

revoke_delegate

Remove a delegate's permission to transfer tokens from your wallet, ensuring only you control token movements.

Instructions

Revoke a delegate's authority to transfer tokens

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
walletNameYesName of the wallet that owns the tokens
tokenMintYesToken mint address

Implementation Reference

  • Implements the revoke_delegate tool logic: retrieves the wallet and associated token account, then uses Solana's SPL token `revoke` instruction to remove delegate authority and returns the transaction signature.
    async function handleRevokeDelegate(args: any) { const { walletName, tokenMint } = args; const wallet = wallets.get(walletName); if (!wallet) { throw new Error(`Wallet '${walletName}' not found`); } ensureConnection(); const tokenMintPubkey = new PublicKey(tokenMint); const tokenAccount = await getAssociatedTokenAddress( tokenMintPubkey, wallet.keypair.publicKey ); const signature = await revoke( connection, wallet.keypair, tokenAccount, wallet.keypair ); return { success: true, signature, explorerUrl: `https://explorer.solana.com/tx/${signature}?cluster=${currentNetwork}` }; }
  • Defines the input schema for the revoke_delegate tool, requiring walletName and tokenMint parameters.
    { name: "revoke_delegate", description: "Revoke a delegate's authority to transfer tokens", inputSchema: { type: "object", properties: { walletName: { type: "string", description: "Name of the wallet that owns the tokens" }, tokenMint: { type: "string", description: "Token mint address" } }, required: ["walletName", "tokenMint"] } }
  • src/index.ts:1357-1359 (registration)
    Registers the revoke_delegate tool handler by dispatching to handleRevokeDelegate in the main CallToolRequestSchema handler switch statement.
    case "revoke_delegate": result = await handleRevokeDelegate(args); break;

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