Skip to content

Conversation

@mattzcarey
Copy link
Contributor

WIP api design.

Builds off work done by @chipgpt #1068

Motivation and Context

How Has This Been Tested?

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

@mattzcarey mattzcarey requested a review from a team as a code owner December 1, 2025 18:37
@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 1, 2025

Open in StackBlitz

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/sdk@1206

commit: fc9da3c

@KKonstantinov
Copy link
Contributor

See we've extended this PR to add the same functionality for prompts and resources changes. LGTM

Copy link
Contributor

@KKonstantinov KKonstantinov left a comment

Choose a reason for hiding this comment

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

@chipgpt's PR was also correlating the server capabilities - tools.listChanged = true.

Likely we should demonstrate this here for tools, resources and prompts listChanged.

Should we also add some checks? It feels odd to allow Clients to listen for the change notifications if the server did not advertise this capability (or explicitly advertised it as listChanged: false?

@mattzcarey
Copy link
Contributor Author

adding checks

mattzcarey and others added 3 commits December 4, 2025 10:07
Add tests verifying that listChanged handlers are only activated when the server advertises the corresponding capability. Tests cover:
- Handler not activated when server lacks listChanged capability
- Handler activated when server advertises capability
- No handlers activated when server has no listChanged capabilities
- Partial capability support with some handlers activated

Also defer handler setup until after initialization when server capabilities are known,
Copy link
Contributor

@KKonstantinov KKonstantinov left a comment

Choose a reason for hiding this comment

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

LGTM!

@KKonstantinov KKonstantinov merged commit b0aac58 into main Dec 4, 2025
10 checks passed
@KKonstantinov KKonstantinov deleted the feat-list-changed-client branch December 4, 2025 19:08
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.

4 participants