Controls how MCP tool calls are logged and retained. Every call that runs a tool is recorded as an McpToolCallLog row and published as an . Calls refused before the tool runs, such as an unknown or switched-off tool, invalid arguments, a missing permission, or a rate limit, leave no row and no event. So does the confirmation preview of a destructive tool.
McpToolCallEventnumber30 (days)How many days to retain tool-call logs. Must be non-negative. Set to 0 to retain all logs.
McpLogCapture'metadata'How much of each tool call is stored on its log row. metadata stores the tool name, the
actor, the status, the duration and the related IDs. full also stores the call's input
and output, which may hold personal data. Supply redact to sanitize those, and see
maxBodyBytes for the size cap applied to each.
McpLogRedactFnFunction that rewrites a call's input and output before they are stored. Runs only
when capture is 'full'. If it throws, the call is still recorded, both bodies are
stored as null, and a warning is logged.
Example
number64000The largest input or output body stored on a log row, in bytes, measured after redaction
and JSON serialization. Applies only when capture is 'full'. A larger body is replaced
with a marker recording the reason and the real size, so the audit row is still written. The
default fits within the 65,535-byte limit of a MySQL TEXT column.
McpRetentionSchedulecron => cron.everyDayAt(2, 30)Schedule for the cleanup job that deletes expired tool-call logs. Accepts a cron expression string, or a function that builds one.
booleanfalseWhether each tool-call log row stores the caller's IP address. Off by default because an
IP address is personal data. Behind a reverse proxy, enable Vendure's trustProxy so the
stored address is the caller's rather than the proxy's.
Architecture reviews, custom plugin work, migrations, ongoing support. Get a hand from the team that builds Vendure.
Talk to the team