sentinel_chain
Scan all Chainlink price feeds on a specific blockchain to monitor data accuracy and availability for DeFi applications.
Instructions
Scan all Chainlink price feeds on a specific chain
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | Yes | Chain to scan (ethereum, polygon, arbitrum, base, avalanche, bnb) |
Implementation Reference
- src/mcp/server.ts:71-107 (handler)The "sentinel_chain" tool is registered and implemented as a handler in src/mcp/server.ts, using `readAllFeeds` and `detectAnomalies`.
server.tool( "sentinel_chain", "Scan all Chainlink price feeds on a specific chain", { chain: z .enum(chains as [string, ...string[]]) .describe("Chain to scan (ethereum, polygon, arbitrum, base, avalanche, bnb)"), }, async ({ chain }) => { const feeds = await readAllFeeds(chain); if (feeds.length === 0) { return { content: [{ type: "text", text: `No feeds available for ${chain}` }] }; } const anomalies = detectAnomalies(feeds); const lines = feeds.map( (f) => `${f.pair.padEnd(10)} $${f.price.toFixed(4).padStart(12)} | staleness: ${Math.floor(f.staleness / 60)}m | round: ${f.roundId}` ); return { content: [ { type: "text", text: [ `**${chain.toUpperCase()} — ${feeds.length} feeds**`, "```", ...lines, "```", anomalies.length > 0 ? `\n**${anomalies.length} anomalies:** ${anomalies.map((a) => a.details).join("; ")}` : "\nNo anomalies.", ].join("\n"), }, ], }; } );