mirror of
https://github.com/open-webui/open-webui.git
synced 2026-12-04 02:28:02 -05:00
refac
This commit is contained in:
1 parent
0313ea0238
commit
ffae4116a8
1 file changed
+8
-2
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user