Kommander writes audit records for MCP tool calls so administrators can trace which tool ran, which conversation triggered it, whether it succeeded, how long it took, and which connector or verified identity was involved.

Log Location

Tool audit records are stored in MongoDB in the tool_audit_logs collection. The admin console reads the same collection through:

  • UI: /admin/tool-audit-logs
  • API: GET /api/admin/tool-audit-logs

Conversation debugging also links tool calls to their audit entries when conversation messages contain tool-call metadata.

Recorded Fields

FieldDescription
userIdKommander user that owned the request.
organizationIdOrganization context when available.
conversationIdConversation that triggered the tool call.
toolNameTool function name requested by the model.
toolCallIdProvider tool-call ID.
correlationIdStable correlation key combining turn and tool-call ID.
successBoolean success flag.
statusOne of success, error, rate_limited, budget_exceeded, timeout, circuit_open, or ownership_check_failure.
argumentsRedacted tool arguments.
resultRedacted tool result.
connectorIdConnector identifier for customer-data tools.
connectorTypeConnector type such as openapi.
verifiedUserIdVerified end-user audit identifier when available.
durationMsExecution duration measured by the tool-call handler.
errorMessageSanitized failure summary for failed calls.
eventTypetool_call or ownership_check_failure.
timestampAudit event time.
metadataExtra diagnostic data for ownership and limit events.

Redaction

Audit writes redact common sensitive fields in both arguments and results before persistence. The default redaction list includes fields such as authorization, apiKey, bearerToken, cookie, credentials, email, firstName, lastName, fullName, phone, password, secret, token, userHash, and payment or identity document fields.

Customer-data connectors can add connector-specific redaction keys with metadata.config.sensitiveFields.

Connector-specific audit redaction

Query and Export

The admin API returns JSON and accepts filter query parameters:

curl -H "Authorization: Bearer $ADMIN_TOKEN" \ "https://app.kommander.ai/api/admin/tool-audit-logs?conversationId=conversation_123&limit=200"

Supported filters are:

Query parameterDescription
idExact audit log document ID.
userIdKommander user ID.
toolNameExact tool name.
toolCallIdProvider tool-call ID.
connectorIdCustomer-data connector ID.
correlationIdCorrelation ID.
conversationIdConversation ID.
successtrue or false.
statusTool status value.
startDateISO date lower bound.
endDateISO date upper bound.
limitResult limit from 1 to 500. Defaults to 200.

The API response is the supported application-level export format. For operational exports outside the app, export the MongoDB tool_audit_logs collection directly with the same filters and treat redacted fields as the canonical persisted values.

MongoDB JSON export

Indexes

The audit collection creates indexes for common investigations:

IndexPurpose
timestampRecent audit review.
userId, timestampUser-level investigation.
toolName, timestampTool-level diagnostics.
connectorId, timestampConnector-level diagnostics.
correlationIdSingle call correlation.
conversationId, timestampConversation debugging.
toolCallIdProvider tool-call lookup.

Audit writes are best effort. A failed audit insert is logged server-side and does not make the user-facing tool call fail.