debugInfo
Extract and analyze detailed debug information from Heptabase backups to identify and resolve data inconsistencies or errors efficiently.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server.ts:736-789 (handler)The async handler function for the debugInfo tool. It gathers and returns debug information about the server configuration, backup manager status (including backup count), and data service statistics (whiteboard count, card count, etc.), formatted as JSON.handler: async () => { try { const result: any = { config: this.config, backupManager: null, dataService: null }; // Check backup manager if (!this.backupManager) { result.backupManager = { status: 'Not initialized' }; } else { const backups = await this.backupManager.listBackups(); result.backupManager = { status: 'Initialized', backupCount: backups.length, latestBackup: backups[0] || null }; } // Check data service if (!this.dataService) { result.dataService = { status: 'Not initialized' }; } else { const data = this.dataService.getData(); result.dataService = { status: 'Initialized', whiteboardCount: Object.keys(data.whiteboards).length, cardCount: Object.keys(data.cards).length, cardInstanceCount: Object.keys(data.cardInstances).length, connectionCount: Object.keys(data.connections).length, sampleWhiteboards: Object.values(data.whiteboards).slice(0, 3).map(wb => ({ id: wb.id, name: wb.name, isTrashed: wb.isTrashed })) }; } return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; } catch (error) { return { content: [{ type: 'text', text: `Error getting debug info: ${error instanceof Error ? error.message : String(error)}` }] }; } }
- src/server.ts:732-732 (schema)Zod input schema for the debugInfo tool, which accepts no parameters (empty object).const debugInfoSchema = z.object({});
- src/server.ts:792-794 (registration)Registration of the 'debugInfo' tool with the MCP server, using the defined schema and delegating execution to the pre-defined handler.this.server.tool('debugInfo', debugInfoSchema.shape, async () => { return this.tools.debugInfo.handler({}); });