diff --git a/litellm/experimental_mcp_client/tools.py b/litellm/experimental_mcp_client/tools.py index 8e640f8b837..df644fd7f4a 100644 --- a/litellm/experimental_mcp_client/tools.py +++ b/litellm/experimental_mcp_client/tools.py @@ -130,7 +130,7 @@ async def list_tools_with_pagination( tools.extend(result.tools) next_cursor = result.next_cursor - if not next_cursor: + if not isinstance(next_cursor, str) or not next_cursor: return tools if next_cursor in seen_cursors: verbose_logger.warning(