We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 49a13ec commit 2b0429bCopy full SHA for 2b0429b
langchain_mcp_adapters/tools.py
@@ -83,7 +83,9 @@ async def _list_all_tools(session: ClientSession) -> list[MCPTool]:
83
if list_tools_page_result.tools:
84
all_tools.extend(list_tools_page_result.tools)
85
86
- if list_tools_page_result.nextCursor is None:
+ # Pagination spec: https://modelcontextprotocol.io/specification/2025-06-18/server/utilities/pagination
87
+ # compatible with None or ""
88
+ if not list_tools_page_result.nextCursor:
89
break
90
91
current_cursor = list_tools_page_result.nextCursor
0 commit comments