@Around("@annotation(mcpTool)") public Object auditToolCall( ProceedingJoinPoint jp, McpTool mcpTool) throws Throwable { String tool = mcpTool.name(); log.info("[AUDIT] {} called args={}", tool, jp.getArgs()); try { Object result = jp.proceed(); log.info("[AUDIT] {} success", tool); return result; } catch (Throwable t) { log.error("[AUDIT] {} error: {}", tool, t.getMessage(), t); throw t; } } } AOP で全ツールの 監査ログを共通化できる @McpTool 付きメソッドを対象にする 呼ばれた時と結果を返す時にログを 書く Aspect 1 つで個別に書かなくて済む ④ ログは行動の証跡 実装 41 / 54 S P R I N G A I × M C P