Skip to main content
Glama

get-soon-testnet-last-transaction

Retrieve the most recent transaction for a specified address on the SOON testnet blockchain using the SVM-MCP server.

Instructions

Get the last transaction of an address on the Soon testnet

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesThe SOON address to get the last transaction for

Implementation Reference

  • Handler function that gets the latest transaction signature for the address using getSignaturesForAddress (limit 1), then fetches the confirmed transaction details, handles no transactions or errors, and returns JSON stringified transaction or error message.
    async ({ address }) => { try { const signatures = await connectionTestnet.getSignaturesForAddress( new PublicKey(address), { limit: 1 } ); if (signatures.length === 0) { return { content: [ { type: "text", text: "No transactions found for this address", }, ], }; } const latestSignature = signatures[0].signature; const transaction = await connectionTestnet.getConfirmedTransaction( latestSignature ); return { content: [ { type: "text", text: JSON.stringify(transaction), }, ], }; } catch (error) { return { content: [ { type: "text", text: `Error getting transaction: ${ error instanceof Error ? error.message : String(error) }`, }, ], }; } }
  • Zod input schema requiring a single 'address' string parameter with description.
    { address: z .string() .describe("The SOON address to get the last transaction for"), },
  • src/index.ts:41-93 (registration)
    Registration of the tool via server.tool(), specifying name, description, input schema, and inline handler function.
    server.tool( "get-soon-testnet-last-transaction", "Get the last transaction of an address on the Soon testnet", { address: z .string() .describe("The SOON address to get the last transaction for"), }, async ({ address }) => { try { const signatures = await connectionTestnet.getSignaturesForAddress( new PublicKey(address), { limit: 1 } ); if (signatures.length === 0) { return { content: [ { type: "text", text: "No transactions found for this address", }, ], }; } const latestSignature = signatures[0].signature; const transaction = await connectionTestnet.getConfirmedTransaction( latestSignature ); return { content: [ { type: "text", text: JSON.stringify(transaction), }, ], }; } catch (error) { return { content: [ { type: "text", text: `Error getting transaction: ${ error instanceof Error ? error.message : String(error) }`, }, ], }; } } );
  • src/index.ts:12-19 (registration)
    Tool name listed in the McpServer capabilities array.
    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", ],
  • Testnet RPC connection instance used by the tool's handler for Solana queries.
    const connectionTestnet = new Connection("https://rpc.testnet.soo.network/rpc");

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