thealeph_export_stats
Export network monitoring data from The Aleph MCP server in JSON or CSV format for analysis and reporting.
Instructions
Export all monitoring data in specified format
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | Export format | json |
Implementation Reference
- src/tools.js:357-377 (handler)The main handler function that executes the 'thealeph_export_stats' tool logic. It extracts the format parameter, calls the API client to export monitoring data, formats the response as JSON code block or plain text, and handles errors.async exportStats(params) { try { const { format = 'json' } = params; const result = await this.client.exportMonitoringData(format); let response = `💾 Exported Monitoring Data (${format.toUpperCase()})\n\n`; if (format === 'json') { response += '```json\n'; response += JSON.stringify(result, null, 2); response += '\n```'; } else { response += result; } return response; } catch (error) { return `❌ Failed to export monitoring data: ${error.message}`; } }
- src/tools.js:68-83 (schema)The input schema and tool definition for 'thealeph_export_stats', specifying the optional 'format' parameter with enum ['json', 'csv']. This is returned by getToolDefinitions() for MCP server registration.{ name: 'thealeph_export_stats', description: 'Export all monitoring data in specified format', inputSchema: { type: 'object', properties: { format: { type: 'string', description: 'Export format', enum: ['json', 'csv'], default: 'json' } }, required: [] } },
- src/tools.js:236-237 (registration)The switch case in executeTool() that registers and dispatches calls to the 'thealeph_export_stats' handler.case 'thealeph_export_stats': return this.exportStats(params);