Skip to main content
Glama

list_wallets

Retrieve all created and imported Solana wallets to manage your blockchain assets and accounts across networks.

Instructions

List all created/imported wallets

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'list_wallets' tool. It iterates over the global 'wallets' Map, extracts name and address for each wallet, and returns a list with count.
    async function handleListWallets() { const walletList = Array.from(wallets.values()).map(wallet => ({ name: wallet.name, address: wallet.keypair.publicKey.toString() })); return { wallets: walletList, count: walletList.length }; }
  • The tool schema definition including name, description, and empty input schema (no parameters required), registered in the tools list returned by ListToolsRequest.
    { name: "list_wallets", description: "List all created/imported wallets", inputSchema: { type: "object", properties: {} } },
  • src/index.ts:1291-1293 (registration)
    Registration/dispatch in the CallToolRequestSchema handler's switch statement, which calls the handleListWallets function when 'list_wallets' is invoked.
    case "list_wallets": result = await handleListWallets(); break;
  • Global in-memory storage Map for wallets, used by list_wallets and other wallet-related tools.
    const wallets = new Map<string, { keypair: Keypair; name: string }>();

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