get-soon-mainnet-balance
Check the SOON mainnet balance for any address to monitor cryptocurrency holdings on the SVM blockchain.
Instructions
Get the balance of a address on the Soon mainnet
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| address | Yes | The SOON address to get the balance of |
Implementation Reference
- src/index.ts:140-150 (handler)The handler function that retrieves the Soon mainnet balance for the given address using Solana's connectionMainnet.getBalance and returns it as formatted text.async ({ address }) => { const balance = await connectionMainnet.getBalance(new PublicKey(address)); return { content: [ { type: "text", text: `Balance: ${balance}`, }, ], }; }
- src/index.ts:137-139 (schema)Zod schema for input validation: requires a string 'address' parameter.{ address: z.string().describe("The SOON address to get the balance of"), },
- src/index.ts:134-151 (registration)Full tool registration call including name, description, schema, and handler function.server.tool( "get-soon-mainnet-balance", "Get the balance of a address on the Soon mainnet", { address: z.string().describe("The SOON address to get the balance of"), }, async ({ address }) => { const balance = await connectionMainnet.getBalance(new PublicKey(address)); return { content: [ { type: "text", text: `Balance: ${balance}`, }, ], }; } );
- src/index.ts:7-7 (helper)RPC connection to Soon mainnet used in the balance handler.const connectionMainnet = new Connection("https://rpc.mainnet.soo.network/rpc");
- src/index.ts:16-16 (registration)Tool name listed in server capabilities."get-soon-mainnet-balance",