helius_get_recent_performance_samples
Retrieve recent performance samples from the Solana blockchain to monitor network health and analyze transaction metrics.
Instructions
Get recent performance samples
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No |
Implementation Reference
- src/handlers/helius.ts:301-308 (handler)The handler function that executes the tool logic: calls Helius RPC getRecentPerformanceSamples with optional limit, stringifies the result or returns error.export const getRecentPerformanceSamplesHandler = async (input: GetRecentPerformanceSamplesInput): Promise<ToolResultSchema> => { try { const samples = await (helius as any as Helius).connection.getRecentPerformanceSamples(input.limit); return createSuccessResponse(`Recent performance samples: ${JSON.stringify(samples, null, 2)}`); } catch (error) { return createErrorResponse(`Error getting performance samples: ${error instanceof Error ? error.message : String(error)}`); } }
- src/tools.ts:254-264 (schema)MCP tool definition with name, description, and inputSchema (optional limit: number).{ name: "helius_get_recent_performance_samples", description: "Get recent performance samples", inputSchema: { type: "object", properties: { limit: { type: "number" } }, required: [] } },
- src/tools.ts:569-569 (registration)Registers the tool name to the getRecentPerformanceSamplesHandler in the handlers dictionary."helius_get_recent_performance_samples": getRecentPerformanceSamplesHandler,
- src/handlers/helius.types.ts:143-145 (schema)TypeScript type for the handler input, matching the JSON schema.export type GetRecentPerformanceSamplesInput = { limit?: number; }