helius_get_recent_performance_samples
Retrieve recent performance samples from the Solana blockchain via the Helius API to monitor and analyze system or transaction efficiency.
Instructions
Get recent performance samples
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No |
Input Schema (JSON Schema)
{
"properties": {
"limit": {
"type": "number"
}
},
"required": [],
"type": "object"
}
Implementation Reference
- src/handlers/helius.ts:301-308 (handler)The main handler function that calls the Helius RPC to get recent performance samples and formats the response.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)JSON Schema defining the input for the tool, including optional limit parameter.{ 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)Maps the tool name to its handler function in the handlers dictionary."helius_get_recent_performance_samples": getRecentPerformanceSamplesHandler,
- src/handlers/helius.types.ts:143-145 (schema)TypeScript type definition for the handler's input parameter.export type GetRecentPerformanceSamplesInput = { limit?: number; }