Skip to main content
Glama

get-soon-testnet-account-tokens

Retrieve token holdings for a specific address on the SOON testnet to view balances and assets in the SVM blockchain ecosystem.

Instructions

Get the tokens of a address on the Soon testnet

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesThe SOON address to get the tokens of

Implementation Reference

  • Handler function fetches token accounts by owner on Soon testnet using Solana Web3.js and returns JSON or error message.
    async ({ address }) => { try { const tokens = await connectionTestnet.getTokenAccountsByOwner( new PublicKey(address), { programId: new PublicKey( "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" ), } ); return { content: [ { type: "text", text: JSON.stringify(tokens), }, ], }; } catch (error) { return { content: [ { type: "text", text: `Error getting tokens: ${ error instanceof Error ? error.message : String(error) }`, }, ], }; } }
  • Zod input schema requiring a 'address' string parameter.
    { address: z.string().describe("The SOON address to get the tokens of"), },
  • src/index.ts:95-132 (registration)
    Full tool registration with server.tool(), including name, description, schema, and handler.
    server.tool( "get-soon-testnet-account-tokens", "Get the tokens of a address on the Soon testnet", { address: z.string().describe("The SOON address to get the tokens of"), }, async ({ address }) => { try { const tokens = await connectionTestnet.getTokenAccountsByOwner( new PublicKey(address), { programId: new PublicKey( "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" ), } ); return { content: [ { type: "text", text: JSON.stringify(tokens), }, ], }; } catch (error) { return { content: [ { type: "text", text: `Error getting tokens: ${ error instanceof Error ? error.message : String(error) }`, }, ], }; } } );

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