Skip to content

Conversation

@devcrocod
Copy link
Contributor

  • Fix debug logging in the createMessage method to include message count, maxTokens, temperature, and presence of a system prompt;
  • Fix debug logging in the createElicitation method to show message length and schema property count
  • Added trace logging

Motivation and Context

The full message was printed in the debug logs, which could contain confidential information

Breaking Changes

None

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors logging and type inference in the ServerSession class. The changes remove redundant explicit type parameters from request() calls and improve logging by separating debug-level summaries from trace-level detailed information.

Key Changes

  • Removed explicit type parameters from request<T>() calls, relying on Kotlin's type inference
  • Enhanced createMessage and createElicitation debug logs with structured summaries instead of full parameter dumps
  • Added trace-level logging for full request details, following the existing logging pattern in the codebase

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@kpavlov kpavlov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @devcrocod 👍🏻

@kpavlov kpavlov force-pushed the devcrocod/fix-logging branch from cd7857a to fc3b772 Compare November 3, 2025 10:53
@kpavlov kpavlov merged commit 35e51a5 into main Nov 3, 2025
4 checks passed
@kpavlov kpavlov deleted the devcrocod/fix-logging branch November 3, 2025 11:17
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