madeonsol_wallet_tracker_add
Add a Solana wallet to your watchlist for monitoring. Returns a 409 error if already tracked or limit reached.
Instructions
Add a Solana wallet to your watchlist. Returns 409 if already tracked or limit reached.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wallet_address | Yes | Solana wallet address (base58) to track | |
| label | No | Optional human-readable label for this wallet |
Implementation Reference
- src/index.ts:371-384 (registration)Registration of the 'madeonsol_wallet_tracker_add' tool via server.tool() with input schema for wallet_address (required) and label (optional). The handler calls walletTrackerRequest with POST to /wallet-tracker/watchlist.
server.tool( "madeonsol_wallet_tracker_add", "Add a Solana wallet to your watchlist. Returns 409 if already tracked or limit reached.", { wallet_address: z.string().describe("Solana wallet address (base58) to track"), label: z.string().optional().describe("Optional human-readable label for this wallet"), }, { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true }, async ({ wallet_address, label }) => { const body: Record<string, unknown> = { wallet_address }; if (label) body.label = label; return { content: [{ type: "text" as const, text: await walletTrackerRequest("POST", "/wallet-tracker/watchlist", body) }] }; } ); - src/index.ts:374-377 (schema)Input schema definition for the tool using Zod: wallet_address (required string) and label (optional string).
{ wallet_address: z.string().describe("Solana wallet address (base58) to track"), label: z.string().optional().describe("Optional human-readable label for this wallet"), }, - src/index.ts:379-383 (handler)Handler function that constructs the POST request body with wallet_address and optional label, then delegates to walletTrackerRequest helper to make the API call.
async ({ wallet_address, label }) => { const body: Record<string, unknown> = { wallet_address }; if (label) body.label = label; return { content: [{ type: "text" as const, text: await walletTrackerRequest("POST", "/wallet-tracker/watchlist", body) }] }; } - src/index.ts:346-358 (helper)Helper function that performs the actual HTTP request to the MadeOnSol API with JSON content-type and Bearer auth headers. Used by all wallet tracker tools including 'madeonsol_wallet_tracker_add'.
async function walletTrackerRequest(method: string, path: string, body?: unknown): Promise<string> { const headers: Record<string, string> = { "Content-Type": "application/json", ...apiKeyHeaders() }; const res = await fetch(`${BASE_URL}/api/v1${path}`, { method, headers, ...(body ? { body: JSON.stringify(body) } : {}), }); if (!res.ok) { const text = await res.text().catch(() => ""); return `Error ${res.status}: ${text}`; } return JSON.stringify(await res.json(), null, 2); }