Skip to content

[pull] main from modelcontextprotocol:main #80

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 22, 2025

Conversation

pull[bot]
Copy link

@pull pull bot commented May 22, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.1)

Can you help keep this open source service alive? 💖 Please sponsor : )

@pull pull bot added the ⤵️ pull label May 22, 2025
@pull pull bot merged commit e80c015 into jasonkneen:main May 22, 2025
@@ -25,7 +25,7 @@ def get_user_profile(user_id: str) -> str:
# The handler returns a ServerResult with a ListResourceTemplatesResult inside
result = await mcp._mcp_server.request_handlers[types.ListResourceTemplatesRequest](
types.ListResourceTemplatesRequest(
method="resources/templates/list", params=None, cursor=None
method="resources/templates/list", params=None
Copy link

Choose a reason for hiding this comment

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

The cursor parameter has been removed from the ListResourceTemplatesRequest constructor. If this is due to an API change, it might be worth adding a comment explaining why this parameter is no longer needed, especially since this is in a test for issue modelcontextprotocol#129.

Comment on lines +370 to 374
class ListResourcesRequest(PaginatedRequest[Literal["resources/list"]]):
"""Sent from the client to request a list of resources the server has."""

method: Literal["resources/list"]
params: RequestParams | None = None

Copy link

Choose a reason for hiding this comment

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

The ListResourcesRequest class no longer defines its own params field, which is good since it inherits this from PaginatedRequest. However, there's an inconsistency: the method field is still explicitly defined while other similar classes (like ListResourceTemplatesRequest) also have their method field defined explicitly. For consistency, either all paginated request classes should define both fields or inherit both.

Comment on lines +212 to +214
params=types.PaginatedRequestParams(cursor=cursor)
if cursor is not None
else None,
Copy link

Choose a reason for hiding this comment

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

The conditional formatting for the params parameter could be simplified for better readability. Consider using a one-liner or a separate variable assignment before the method call.

Suggested change
params=types.PaginatedRequestParams(cursor=cursor)
if cursor is not None
else None,
params=types.PaginatedRequestParams(cursor=cursor) if cursor is not None else None,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant