debugInfo
Retrieve and analyze detailed information from Heptabase backups to identify and resolve data issues accurately and efficiently.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server.ts:736-789 (handler)The debugInfo tool handler: collects and returns JSON debug information about server config, backup manager status, and data service statistics including counts of whiteboards, cards, instances, and connections.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 requires no parameters.const debugInfoSchema = z.object({});
- src/server.ts:792-794 (registration)Registration of the debugInfo tool with the MCP server using this.server.tool().this.server.tool('debugInfo', debugInfoSchema.shape, async () => { return this.tools.debugInfo.handler({}); });