Skip to content

Conversation

@vincent0426
Copy link
Contributor

Allow extra field within context log

without extra:

{
  "method": "notifications/message",
  "params": {
    "level": "info",
    "data": "test message"
  }
}

with extra:

{
  "method": "notifications/message",
  "params": {
    "level": "info",
    "data": {
      "message": "test message",
      "additional_string": "example",
      "additional_number": 123,
      "additional_boolean": true,
      "additional_list": [
        "a",
        "b",
        "c"
      ],
      "additional_dict": {
        "a": 1,
        "b": 2,
        "c": 3
      },
      "additional_null": null
    }
  }
}

Motivation and Context

Closes #565

How Has This Been Tested?

Unit test, manual test with inspector

Breaking Changes

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

Additional context

@vincent0426 vincent0426 requested a review from Kludex October 31, 2025 14:58
@maxisbey maxisbey added enhancement P3 Nice to haves, rare edge cases labels Nov 4, 2025
@felixweinberger felixweinberger added enhancement Request for a new feature that's not currently supported and removed enhancement deprecated labels Nov 12, 2025
@maxisbey maxisbey enabled auto-merge (squash) December 19, 2025 17:49
@maxisbey maxisbey merged commit 06748eb into modelcontextprotocol:main Dec 19, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Request for a new feature that's not currently supported P3 Nice to haves, rare edge cases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Context.log does not actually accept or pass forward extra kwargs

4 participants