Skip to main content
Glama

get-soon-testnet-balance

Retrieve the testnet balance of a specified SOON address using SVM-MCP. Input the address to view current token holdings on the Soon testnet.

Instructions

Get the balance of a address on the Soon testnet

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesThe SOON address to get the balance of

Implementation Reference

  • Handler function that fetches the Soon testnet balance for a given address using Solana Web3.js getBalance and returns a formatted text response.
    async ({ address }) => { const balance = await connectionTestnet.getBalance(new PublicKey(address)); return { content: [ { type: "text", text: `Balance: ${balance}`, }, ], }; }
  • Zod input schema defining the 'address' parameter as a string with description.
    { address: z.string().describe("The SOON address to get the balance of"), },
  • src/index.ts:22-39 (registration)
    Registration of the 'get-soon-testnet-balance' tool on the McpServer, specifying name, description, input schema, and handler function.
    server.tool( "get-soon-testnet-balance", "Get the balance of a address on the Soon testnet", { address: z.string().describe("The SOON address to get the balance of"), }, async ({ address }) => { const balance = await connectionTestnet.getBalance(new PublicKey(address)); return { content: [ { type: "text", text: `Balance: ${balance}`, }, ], }; } );
  • Testnet RPC connection instance used by the tool handler to query balances.
    const connectionTestnet = new Connection("https://rpc.testnet.soo.network/rpc");
  • src/index.ts:12-19 (registration)
    Declaration of tool capabilities in McpServer constructor, including 'get-soon-testnet-balance'.
    capabilities: [ "get-soon-testnet-balance", "get-soon-testnet-last-transaction", "get-soon-testnet-account-tokens", "get-soon-mainnet-balance", "get-soon-mainnet-last-transaction", "get-soon-mainnet-account-tokens", ],

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/rkmonarch/svm-mcp'

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