Skip to main content
Glama

get_wallet_history

Retrieve transaction history for a Solana wallet address, showing both received and sent funds with dates.

Instructions

Transaction history : Retrieve list of the transactions related to the specified Solana wallet address (received and sent funds with dates)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
walletAddressNoThe Solana address of the wallet you want to see, if not provided, uses the currently connected user wallet address.

Implementation Reference

  • Executes the get_wallet_history tool: fetches transaction history for a given Solana wallet address or the current user's wallet via API calls.
    export async function get_wallet_history(args: any) { const { walletAddress } = args; var pubk = ''; var result = { error: 'Not found' } as any if (walletAddress) { pubk = walletAddress; } else { const { apiKey } = resolveAuth(undefined, undefined); var jsP = { myKey: apiKey } const fet = await fetch(BASE + '/api/getAPIUser', { method: 'POST', headers: { Accept: 'application.json', 'Content-Type': 'application/json' }, body: JSON.stringify(jsP) }); var dat = await fet.text(); result = JSON.parse(dat); pubk = result.pubk; } if (!pubk) throw new Error("User not found, please provide a Solana public wallet address"); const fet = await fetch(BASE + '/api/walletHistory/' + pubk + '/' + new Date().getTime()); var dat = await fet.text(); process.stderr.write(`[caisse][info] dat2 ${dat}\n`); var result = JSON.parse(dat); return result; }
  • Zod shape defining the input schema for the get_wallet_history tool.
    export const getWalletHistoryShape = { walletAddress: z.string().optional().describe("The Solana address of the wallet you want to see, if not provided, uses the currently connected user wallet address.") };
  • src/solution.ts:75-79 (registration)
    Registers the get_wallet_history tool in the main tools array used for ListTools.
    name: "get_wallet_history", description: get_wallet_history_title, inputSchema: jsonSchema(zodToJsonSchema(z.object(getWalletHistoryShape))).jsonSchema, annotations: { title: get_wallet_history_title, readOnlyHint: true } },
  • Dispatches tool calls to the get_wallet_history handler in the main MCP CallToolRequest handler.
    case "get_wallet_history": result = await get_wallet_history(args); break;
  • Alternative registration of the tool within the payments module's registerPaymentsTools function.
    'get_wallet_history', { title: get_wallet_history_title, description: get_wallet_history_title, inputSchema: getWalletHistoryShape, annotations: { title: get_wallet_history_title, readOnlyHint: true } }, async (e) => await wrapResult(get_wallet_history, e) );

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/paracetamol951/P-Link-MCP'

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