Skip to content

Conversation

@m9p909
Copy link
Collaborator

@m9p909 m9p909 commented Jan 6, 2026

What is the purpose of this change?

Adds structured logging for MCP tool calls to enable tracking and auditing of tool usage per user and agent.

How was this change implemented?

Added _log_mcp_tool_call function in embed_resolving_mcp_toolset.py that creates info-level logs with structured fields (user_id, agent_id, tool_name, session_id). Called before tool execution in EmbedResolvingMCPTool.call_tool.

How was this change tested?

  • Manual testing: Deploy to test environment and verify logs appear when MCP tools are called

Is there anything the reviewers should focus on/be aware of?

Verify the structured fields in the extra parameter are sufficient for auditing needs. Log level is INFO to ensure visibility without debug mode.

Adds structured logging for MCP tool calls to enable tracking usage per user/agent. The log includes user_id, agent_id, tool_name, and session_id both in the message and as structured extra fields for easy filtering and auditing.
@sonarqube-solacecloud
Copy link

@m9p909 m9p909 merged commit 1715f91 into main Jan 6, 2026
22 checks passed
@m9p909 m9p909 deleted the jclarke/DATAGO-119367-add-wide-logs-for-auditing-mcp-server-usage branch January 6, 2026 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants