Skip to main content
Glama

dhis2_export_audit_log

Export complete audit logs as JSON for compliance reporting and system monitoring in DHIS2 health information systems.

Instructions

Export complete audit log as JSON for compliance reporting

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The primary handler for the 'dhis2_export_audit_log' tool within the main tool call switch statement. It invokes the auditLogger's exportAuditLog method and formats the response.
    case 'dhis2_export_audit_log': const exportData = auditLogger.exportAuditLog(); auditLogger.log({ toolName: name, parameters: {}, outcome: 'success', dhis2Instance: dhis2Client?.baseURL, userId: currentUser?.username, executionTime: Date.now() - startTime }); return { content: [{ type: 'text', text: `📤 Audit Log Export\n\n${exportData}` }] };
  • The AuditLogger class method that generates a JSON string containing the audit entries, summary, and export timestamp. This is called by the tool handler.
    exportAuditLog(): string { return JSON.stringify({ exportTimestamp: new Date().toISOString(), entries: this.entries, summary: this.getAuditSummary() }, null, 2); }
  • The exported singleton instance of AuditLogger used throughout the application, including by the tool handler.
    export const auditLogger = new AuditLogger();
  • src/index.ts:106-110 (registration)
    The ListToolsRequestSchema handler filters available tools based on permissions. The 'dhis2_export_audit_log' tool is included in the 'tools' array from createDevelopmentTools() and made available here.
    const filteredTools = PermissionSystem.filterToolsByPermissions(tools, userPermissions); return { tools: filteredTools, };

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Dradebo/dhis2-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server