get_acl_audit
Retrieve ACL audit logs to investigate connection failures and audit access patterns by filtering username, reason, or time range.
Instructions
Get persisted ACL audit log entries from storage. Filter by username, reason (auth, command, key, channel), or time range. Use this to investigate why a connection is failing or audit access patterns.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| username | No | Filter by username | |
| reason | No | Filter by reason (auth, command, key, channel) | |
| startTime | No | Start time (Unix timestamp ms) | |
| endTime | No | End time (Unix timestamp ms) | |
| limit | No | Max entries to return | |
| instanceId | No | Optional instance ID override |
Implementation Reference
- packages/mcp/src/index.ts:662-669 (handler)The handler function for 'get_acl_audit' which fetches the ACL audit log data from the API based on provided query parameters.
async ({ username, reason, startTime, endTime, limit, instanceId }) => { const id = resolveInstanceId(instanceId); const qs = buildQuery({ username, reason, startTime, endTime, limit }); const data = await apiFetch(`/mcp/instance/${id}/audit${qs}`); return { content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }], }; }, - packages/mcp/src/index.ts:651-661 (registration)The registration of the 'get_acl_audit' tool using server.tool, including the definition of its schema/arguments.
server.tool( 'get_acl_audit', 'Get persisted ACL audit log entries from storage. Filter by username, reason (auth, command, key, channel), or time range. Use this to investigate why a connection is failing or audit access patterns.', { username: z.string().optional().describe('Filter by username'), reason: z.string().optional().describe('Filter by reason (auth, command, key, channel)'), startTime: z.number().optional().describe('Start time (Unix timestamp ms)'), endTime: z.number().optional().describe('End time (Unix timestamp ms)'), limit: z.number().optional().describe('Max entries to return'), instanceId: z.string().optional().describe('Optional instance ID override'), },