# Interface AuditEvent

Structured audit event used for MCP tool call tracking.

Designed to be serialised to JSON for append-only log sinks (CloudWatch, Elasticsearch, etc.).

interface AuditEvent {
action: string;
level: LogLevel;
timestamp: string;
duration?: number;
params?: Record<string, unknown>;
result?: { success: boolean; count?: number; error?: string };
toolName?: string;
}

- Defined in utils/auditLogger.ts:83

##### Index

### Properties

action
level
timestamp
duration?
params?
result?
toolName?

## Properties

### action

action: string

Action / tool name

- Defined in utils/auditLogger.ts:89

### level

level: LogLevel

Severity level of the event

- Defined in utils/auditLogger.ts:85

### timestamp

timestamp: string

ISO-8601 timestamp

- Defined in utils/auditLogger.ts:87

### `Optional` duration

duration?: number

Wall-clock duration of the operation in milliseconds

- Defined in utils/auditLogger.ts:101

### `Optional` params

params?: Record<string, unknown>

Sanitised tool input parameters

- Defined in utils/auditLogger.ts:93

### `Optional` result

result?: { success: boolean; count?: number; error?: string }

Outcome metadata

- Defined in utils/auditLogger.ts:95

### `Optional` toolName

toolName?: string

MCP tool name (if the event was triggered by a tool call)

- Defined in utils/auditLogger.ts:91