Skip to main content
Glama

get-soon-testnet-last-transaction

Retrieve the most recent transaction for a specific address on the Soon testnet using SVM-MCP server. Input the address to obtain detailed transaction data.

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

  • The main handler function that implements the tool logic: fetches the most recent transaction signature for the given address on the Soon testnet using Solana RPC methods getSignaturesForAddress (limit 1) and getConfirmedTransaction, handles no transactions or errors by returning text content.
    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 defining the 'address' parameter as a string.
    { address: z .string() .describe("The SOON address to get the last transaction for"), },
  • src/index.ts:41-93 (registration)
    Tool registration 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:9-20 (registration)
    Tool listed in server capabilities array.
    const server = new McpServer({ name: "svm-mcp", version: "0.0.1", 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