libtmux_mcp.middleware.AuditMiddleware
- Bases:
- Middleware
Emit a structured log record per tool invocation.
Description#
Records carry: tool name, outcome (ok/error), duration in ms, error type on failure, the fastmcp client_id / request_id when available, and a redacted argument summary. The logger name is
libtmux_mcp.auditby default so operators can route it independently (e.g. to a JSON file) without touching the modulelibtmux_mcplogger.
Members
-
- Parameters
-
-
logger_name(str) #
-
- on_call_tool ( self, context: Middleware
Context , call_next: t.Any ) t.Any -
Wrap the tool call with a timer and emit one audit record.