Skip to content

Conversation

Kludex
Copy link
Member

@Kludex Kludex commented Mar 14, 2025

No description provided.

Comment on lines -79 to -90
sampling = (
types.SamplingCapability() if self._sampling_callback is not None else None
)
roots = (
types.RootsCapability(
# TODO: Should this be based on whether we
# _will_ send notifications, or only whether
# they're supported?
listChanged=True,
)
if self._list_roots_callback is not None
else None
Copy link
Member Author

Choose a reason for hiding this comment

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

The None was never being used, given that in __init__ they have a default value.

from mcp.types import LATEST_PROTOCOL_VERSION

SUPPORTED_PROTOCOL_VERSIONS = [1, LATEST_PROTOCOL_VERSION]
SUPPORTED_PROTOCOL_VERSIONS: tuple[int, str] = (1, LATEST_PROTOCOL_VERSION)
Copy link
Member

Choose a reason for hiding this comment

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

We can actually make this a list of strings ony land remove the old 1. That predates official release and is long gone.

@dsp-ant dsp-ant merged commit 97201cc into main Mar 14, 2025
7 checks passed
@dsp-ant dsp-ant deleted the some-strictness-type-on-the-client-side branch March 14, 2025 10:56
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.

2 participants