get_audit_log
Retrieve the complete hash-chained audit trail of all compliance checks to maintain a tamper-evident record of actions and verify integrity.
Instructions
Returns the full hash-chained audit trail of all compliance checks.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_audit_log"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:81-96 (handler)Registration and handler implementation for the "get_audit_log" tool within src/index.ts. It calls the AuditLog.getAll() method to retrieve the logs.
server.tool( "get_audit_log", "Returns the full hash-chained audit trail of all compliance checks.", {}, async () => { const entries = auditLog.getAll(); return { content: [ { type: "text" as const, text: JSON.stringify({ count: entries.length, entries }, null, 2), }, ], }; } ); - src/audit.ts:55-57 (helper)Helper method inside the AuditLog class in src/audit.ts that retrieves all audit log entries.
getAll(): AuditEntry[] { return [...this.entries]; }