Skip to main content
Glama

dhis2_clear_audit_log

Clear the DHIS2 audit log to remove old audit records and manage system storage. Requires confirmation before execution.

Instructions

Clear the audit log (requires confirmation)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
confirmedNoSet to true to confirm clearing the audit log

Implementation Reference

  • The main handler for the 'dhis2_clear_audit_log' tool. It calls auditLogger.clear() to empty the audit log and returns a success confirmation message.
    case 'dhis2_clear_audit_log': auditLogger.clear(); return { content: [{ type: 'text', text: `🗑️ Audit log cleared successfully.` }] };
  • The clear() method of AuditLogger class that implements the core logic by resetting the entries array to empty and logging the action.
    clear(): void { this.entries = []; console.log('[AUDIT] Audit log cleared'); }
  • Global singleton instance of AuditLogger used by the tool handler.
    // Global audit logger instance export const auditLogger = new AuditLogger();

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