This commit is contained in:
Timothy Jaeryang Baek 2026-09-12 14:57:22 -04:00
parent 0313ea0238
commit ffae4116a8

View file

@ -89,8 +89,14 @@ class MCPClient:
if not self.session:
raise RuntimeError('MCP client is not connected.')
result = await self.session.list_tools()
tools = result.tools
tools = []
cursor = None
while True:
result = await self.session.list_tools(cursor=cursor)
tools.extend(result.tools)
cursor = result.nextCursor
if cursor is None:
break
tool_specs = []
for tool in tools: