batch_scan
Scan up to 10 Solana token mints in parallel to assess portfolio risk. Returns verdict for each token in a single batch call.
Instructions
Scan multiple Solana tokens in a single call for portfolio-level risk assessment. Runs full_token_scan on each mint in parallel (max 10 per batch). Returns an array of results with verdicts for each token. Use this when evaluating a portfolio, watchlist, or multiple tokens from a pool discovery.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mints | Yes | Array of Solana token mint addresses to scan (max 10) |
Implementation Reference
- src/mcp/server.ts:319-384 (handler)The main handler for the batch_scan MCP tool. Accepts an array of up to 10 token mint addresses. For each mint, runs 5 analyses in parallel (token safety, honeypot check, holder analysis, Birdeye enrichment, and wallet reputation). Aggregates results using Promise.allSettled, computes a weighted final risk score, and returns verdicts (SAFE/CAUTION/HIGH_RISK/CRITICAL) for each token.
// ── Tool: batch_scan ────────────────────────────────────────────────── server.tool( 'batch_scan', `Scan multiple Solana tokens in a single call for portfolio-level risk assessment. Runs full_token_scan on each mint in parallel (max 10 per batch). Returns an array of results with verdicts for each token. Use this when evaluating a portfolio, watchlist, or multiple tokens from a pool discovery.`, { mints: z.array(z.string()).max(10).describe('Array of Solana token mint addresses to scan (max 10)'), }, async ({ mints }) => { try { const results = await Promise.allSettled( mints.map(async (mint) => { const [safety, honeypot, holders, birdeye, walletIntel] = await Promise.all([ analyzeTokenSafety(connection, mint, undefined, false), checkHoneypot(mint), analyzeHolders(connection, mint), enrichWithBirdeye(mint, BIRDEYE_API_KEY), enrichCreatorReputation(mint, HELIUS_API_KEY), ]); let onChainScore = safety.riskScore; if (honeypot.isHoneypot) onChainScore = Math.min(onChainScore + 30, 100); if (holders.concentrated) onChainScore = Math.min(onChainScore + 15, 100); const reputationScore = walletIntel.reputation?.riskScore ?? 0; const marketScore = birdeye.marketRisk.score; const finalScore = Math.round( onChainScore * 0.60 + marketScore * 0.25 + reputationScore * 0.15 ); const verdict = finalScore === 0 ? 'SAFE' : finalScore <= 15 ? 'CAUTION' : finalScore <= 50 ? 'HIGH_RISK' : 'CRITICAL'; return { mint, safe: safety.safe && !honeypot.isHoneypot && !holders.concentrated && marketScore < 30, finalScore, verdict, honeypot: honeypot.isHoneypot, liquidity: birdeye.overview?.liquidity ?? null, marketFlags: birdeye.marketRisk.flags, walletAge: walletIntel.reputation?.creatorAge ?? null, }; }) ); const output = results.map((r, i) => { if (r.status === 'fulfilled') return r.value; return { mint: mints[i], error: r.reason?.message ?? String(r.reason) }; }); return { content: [{ type: 'text' as const, text: JSON.stringify({ scanned: output.length, results: output }, null, 2), }], }; } catch (e: unknown) { const msg = e instanceof Error ? e.message : String(e); return { content: [{ type: 'text' as const, text: JSON.stringify({ error: msg }) }], isError: true, }; } }, ); - src/mcp/server.ts:387-387 (registration)The batch_scan tool is registered via server.tool('batch_scan', ...) at line 320 of src/mcp/server.ts. The description tells the LLM this is for portfolio-level risk assessment of multiple tokens in a single call.
} - src/api/server.ts:128-128 (registration)The batch_scan tool is also listed in the MCP server card at /.well-known/mcp/server-card.json for Smithery/registry discovery, describing it as 'Scan up to 10 tokens in parallel for portfolio-level risk assessment.'
{ name: 'batch_scan', description: 'Scan up to 10 tokens in parallel for portfolio-level risk assessment.' }, - src/mcp/server.ts:323-325 (schema)Input schema for batch_scan: takes a 'mints' field which is a Zod array of strings with a maximum of 10 items. Validated using zod.
{ mints: z.array(z.string()).max(10).describe('Array of Solana token mint addresses to scan (max 10)'), },