tooluniverse 1.0.3__py3-none-any.whl → 1.0.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of tooluniverse might be problematic. Click here for more details.
- tooluniverse/__init__.py +17 -5
- tooluniverse/agentic_tool.py +268 -330
- tooluniverse/compose_scripts/output_summarizer.py +21 -15
- tooluniverse/data/agentic_tools.json +2 -2
- tooluniverse/data/odphp_tools.json +354 -0
- tooluniverse/data/output_summarization_tools.json +2 -2
- tooluniverse/default_config.py +1 -0
- tooluniverse/llm_clients.py +570 -0
- tooluniverse/mcp_tool_registry.py +3 -3
- tooluniverse/odphp_tool.py +226 -0
- tooluniverse/output_hook.py +92 -3
- tooluniverse/remote/boltz/boltz_mcp_server.py +2 -2
- tooluniverse/remote/uspto_downloader/uspto_downloader_mcp_server.py +2 -2
- tooluniverse/smcp.py +204 -112
- tooluniverse/smcp_server.py +23 -20
- tooluniverse/test/list_azure_openai_models.py +210 -0
- tooluniverse/test/test_agentic_tool_azure_models.py +91 -0
- tooluniverse/test/test_api_key_validation_min.py +64 -0
- tooluniverse/test/test_claude_sdk.py +86 -0
- tooluniverse/test/test_global_fallback.py +288 -0
- tooluniverse/test/test_hooks_direct.py +219 -0
- tooluniverse/test/test_odphp_tool.py +166 -0
- tooluniverse/test/test_openrouter_client.py +288 -0
- tooluniverse/test/test_stdio_hooks.py +285 -0
- tooluniverse/test/test_tool_finder.py +1 -1
- {tooluniverse-1.0.3.dist-info → tooluniverse-1.0.5.dist-info}/METADATA +101 -74
- {tooluniverse-1.0.3.dist-info → tooluniverse-1.0.5.dist-info}/RECORD +31 -19
- tooluniverse-1.0.5.dist-info/licenses/LICENSE +201 -0
- tooluniverse-1.0.3.dist-info/licenses/LICENSE +0 -21
- {tooluniverse-1.0.3.dist-info → tooluniverse-1.0.5.dist-info}/WHEEL +0 -0
- {tooluniverse-1.0.3.dist-info → tooluniverse-1.0.5.dist-info}/entry_points.txt +0 -0
- {tooluniverse-1.0.3.dist-info → tooluniverse-1.0.5.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
测试 MCP stdio 模式下关闭和开启 hooks 的情况
|
|
4
|
+
"""
|
|
5
|
+
import subprocess
|
|
6
|
+
import json
|
|
7
|
+
import time
|
|
8
|
+
import sys
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def run_stdio_test(hooks_enabled=False):
|
|
12
|
+
"""运行 stdio 测试"""
|
|
13
|
+
print(f"\n{'='*60}")
|
|
14
|
+
print(f"测试模式: {'开启 hooks' if hooks_enabled else '关闭 hooks'}")
|
|
15
|
+
print(f"{'='*60}")
|
|
16
|
+
|
|
17
|
+
# 构建命令
|
|
18
|
+
cmd = [
|
|
19
|
+
sys.executable,
|
|
20
|
+
"-c",
|
|
21
|
+
f"""
|
|
22
|
+
import sys
|
|
23
|
+
sys.path.insert(0, 'src')
|
|
24
|
+
from tooluniverse.smcp_server import run_stdio_server
|
|
25
|
+
sys.argv = ['tooluniverse-stdio'] + (['--hooks'] if {hooks_enabled} else [])
|
|
26
|
+
run_stdio_server()
|
|
27
|
+
""",
|
|
28
|
+
]
|
|
29
|
+
|
|
30
|
+
print(f"启动命令: {' '.join(cmd[:3])} ...")
|
|
31
|
+
|
|
32
|
+
# 启动服务器进程
|
|
33
|
+
process = subprocess.Popen(
|
|
34
|
+
cmd,
|
|
35
|
+
stdin=subprocess.PIPE,
|
|
36
|
+
stdout=subprocess.PIPE,
|
|
37
|
+
stderr=subprocess.PIPE,
|
|
38
|
+
text=True,
|
|
39
|
+
bufsize=0,
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
try:
|
|
43
|
+
# 等待服务器启动并读取启动日志
|
|
44
|
+
time.sleep(3)
|
|
45
|
+
|
|
46
|
+
# 读取并丢弃启动日志
|
|
47
|
+
print("读取启动日志...")
|
|
48
|
+
while True:
|
|
49
|
+
line = process.stdout.readline()
|
|
50
|
+
if not line:
|
|
51
|
+
break
|
|
52
|
+
print(f"启动日志: {line.strip()}")
|
|
53
|
+
if "Starting ToolUniverse SMCP Server" in line:
|
|
54
|
+
break
|
|
55
|
+
|
|
56
|
+
# 发送初始化请求
|
|
57
|
+
init_request = {
|
|
58
|
+
"jsonrpc": "2.0",
|
|
59
|
+
"id": 1,
|
|
60
|
+
"method": "initialize",
|
|
61
|
+
"params": {
|
|
62
|
+
"protocolVersion": "2024-11-05",
|
|
63
|
+
"capabilities": {},
|
|
64
|
+
"clientInfo": {"name": "test-client", "version": "1.0.0"},
|
|
65
|
+
},
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
print("发送初始化请求...")
|
|
69
|
+
process.stdin.write(json.dumps(init_request) + "\n")
|
|
70
|
+
process.stdin.flush()
|
|
71
|
+
|
|
72
|
+
# 读取初始化响应
|
|
73
|
+
init_response = process.stdout.readline()
|
|
74
|
+
print(f"初始化响应: {init_response.strip()}")
|
|
75
|
+
|
|
76
|
+
# 发送 tools/list 请求
|
|
77
|
+
list_request = {"jsonrpc": "2.0", "id": 2, "method": "tools/list"}
|
|
78
|
+
|
|
79
|
+
print("发送 tools/list 请求...")
|
|
80
|
+
process.stdin.write(json.dumps(list_request) + "\n")
|
|
81
|
+
process.stdin.flush()
|
|
82
|
+
|
|
83
|
+
# 读取 tools/list 响应
|
|
84
|
+
list_response = process.stdout.readline()
|
|
85
|
+
print(f"tools/list 响应长度: {len(list_response)} 字符")
|
|
86
|
+
|
|
87
|
+
# 发送测试工具调用请求
|
|
88
|
+
test_request = {
|
|
89
|
+
"jsonrpc": "2.0",
|
|
90
|
+
"id": 3,
|
|
91
|
+
"method": "tools/call",
|
|
92
|
+
"params": {
|
|
93
|
+
"name": "OpenTargets_get_target_gene_ontology_by_ensemblID",
|
|
94
|
+
"arguments": {"ensemblId": "ENSG00000012048"},
|
|
95
|
+
},
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
print("发送测试工具调用请求...")
|
|
99
|
+
process.stdin.write(json.dumps(test_request) + "\n")
|
|
100
|
+
process.stdin.flush()
|
|
101
|
+
|
|
102
|
+
# 读取工具调用响应(可能需要等待更长时间)
|
|
103
|
+
print("等待工具调用响应...")
|
|
104
|
+
start_time = time.time()
|
|
105
|
+
|
|
106
|
+
# 读取多行响应,直到找到 JSON 响应
|
|
107
|
+
tool_response = ""
|
|
108
|
+
timeout = 30 # 30秒超时
|
|
109
|
+
while time.time() - start_time < timeout:
|
|
110
|
+
line = process.stdout.readline()
|
|
111
|
+
if not line:
|
|
112
|
+
time.sleep(0.1)
|
|
113
|
+
continue
|
|
114
|
+
|
|
115
|
+
tool_response += line
|
|
116
|
+
print(f"收到响应行: {repr(line)}")
|
|
117
|
+
|
|
118
|
+
# 检查是否是 JSON 响应
|
|
119
|
+
try:
|
|
120
|
+
json.loads(line.strip())
|
|
121
|
+
break
|
|
122
|
+
except json.JSONDecodeError:
|
|
123
|
+
continue
|
|
124
|
+
|
|
125
|
+
end_time = time.time()
|
|
126
|
+
response_time = end_time - start_time
|
|
127
|
+
response_length = len(tool_response)
|
|
128
|
+
|
|
129
|
+
print(f"工具调用响应时间: {response_time:.2f} 秒")
|
|
130
|
+
print(f"工具调用响应长度: {response_length} 字符")
|
|
131
|
+
print(f"原始响应内容: {repr(tool_response)}")
|
|
132
|
+
|
|
133
|
+
# 尝试解析 JSON 响应
|
|
134
|
+
json_response = None
|
|
135
|
+
for line in tool_response.split("\n"):
|
|
136
|
+
if line.strip().startswith('{"jsonrpc"'):
|
|
137
|
+
try:
|
|
138
|
+
json_response = json.loads(line.strip())
|
|
139
|
+
break
|
|
140
|
+
except json.JSONDecodeError:
|
|
141
|
+
continue
|
|
142
|
+
|
|
143
|
+
if json_response:
|
|
144
|
+
print("✅ 成功解析 JSON 响应")
|
|
145
|
+
print(f"响应 ID: {json_response.get('id')}")
|
|
146
|
+
if "result" in json_response:
|
|
147
|
+
print("✅ 工具调用成功")
|
|
148
|
+
elif "error" in json_response:
|
|
149
|
+
print(f"❌ 工具调用失败: {json_response['error']}")
|
|
150
|
+
else:
|
|
151
|
+
print("⚠️ 未找到有效的 JSON 响应")
|
|
152
|
+
|
|
153
|
+
# 继续等待实际的工具调用响应
|
|
154
|
+
print("等待工具调用完成...")
|
|
155
|
+
time.sleep(5) # 等待工具执行完成
|
|
156
|
+
|
|
157
|
+
# 读取工具调用的实际响应
|
|
158
|
+
actual_response = ""
|
|
159
|
+
while True:
|
|
160
|
+
line = process.stdout.readline()
|
|
161
|
+
if not line:
|
|
162
|
+
break
|
|
163
|
+
actual_response += line
|
|
164
|
+
print(f"工具响应行: {repr(line)}")
|
|
165
|
+
|
|
166
|
+
# 检查是否是 JSON 响应
|
|
167
|
+
try:
|
|
168
|
+
json.loads(line.strip())
|
|
169
|
+
break
|
|
170
|
+
except json.JSONDecodeError:
|
|
171
|
+
continue
|
|
172
|
+
|
|
173
|
+
if actual_response:
|
|
174
|
+
print(f"工具调用实际响应长度: {len(actual_response)} 字符")
|
|
175
|
+
|
|
176
|
+
# 尝试解析工具调用响应
|
|
177
|
+
tool_json_response = None
|
|
178
|
+
for line in actual_response.split("\n"):
|
|
179
|
+
if line.strip().startswith('{"jsonrpc"'):
|
|
180
|
+
try:
|
|
181
|
+
tool_json_response = json.loads(line.strip())
|
|
182
|
+
break
|
|
183
|
+
except json.JSONDecodeError:
|
|
184
|
+
continue
|
|
185
|
+
|
|
186
|
+
if tool_json_response and "result" in tool_json_response:
|
|
187
|
+
result_content = tool_json_response["result"]
|
|
188
|
+
if "content" in result_content:
|
|
189
|
+
content_text = str(result_content["content"])
|
|
190
|
+
content_length = len(content_text)
|
|
191
|
+
print(f"工具响应内容长度: {content_length} 字符")
|
|
192
|
+
|
|
193
|
+
# 检查是否是摘要
|
|
194
|
+
if "summary" in content_text.lower() or "摘要" in content_text:
|
|
195
|
+
print("✅ 检测到摘要内容")
|
|
196
|
+
else:
|
|
197
|
+
print("📄 原始内容(未摘要)")
|
|
198
|
+
else:
|
|
199
|
+
print("⚠️ 工具响应中没有 content 字段")
|
|
200
|
+
else:
|
|
201
|
+
print("⚠️ 无法解析工具调用响应")
|
|
202
|
+
|
|
203
|
+
return {
|
|
204
|
+
"hooks_enabled": hooks_enabled,
|
|
205
|
+
"response_time": response_time,
|
|
206
|
+
"response_length": response_length,
|
|
207
|
+
"success": True,
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
except Exception as e:
|
|
211
|
+
print(f"❌ 测试失败: {e}")
|
|
212
|
+
return {
|
|
213
|
+
"hooks_enabled": hooks_enabled,
|
|
214
|
+
"response_time": None,
|
|
215
|
+
"response_length": None,
|
|
216
|
+
"success": False,
|
|
217
|
+
"error": str(e),
|
|
218
|
+
}
|
|
219
|
+
finally:
|
|
220
|
+
# 清理进程
|
|
221
|
+
try:
|
|
222
|
+
process.terminate()
|
|
223
|
+
process.wait(timeout=5)
|
|
224
|
+
except Exception:
|
|
225
|
+
process.kill()
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
def main():
|
|
229
|
+
"""主函数"""
|
|
230
|
+
print("MCP stdio 模式 hooks 测试")
|
|
231
|
+
print("测试工具: OpenTargets_get_target_gene_ontology_by_ensemblID")
|
|
232
|
+
print("测试参数: ensemblId=ENSG00000012048")
|
|
233
|
+
|
|
234
|
+
# 测试关闭 hooks
|
|
235
|
+
result_no_hooks = run_stdio_test(hooks_enabled=False)
|
|
236
|
+
|
|
237
|
+
# 测试开启 hooks
|
|
238
|
+
result_with_hooks = run_stdio_test(hooks_enabled=True)
|
|
239
|
+
|
|
240
|
+
# 对比结果
|
|
241
|
+
print(f"\n{'='*60}")
|
|
242
|
+
print("测试结果对比")
|
|
243
|
+
print(f"{'='*60}")
|
|
244
|
+
|
|
245
|
+
print("关闭 hooks:")
|
|
246
|
+
if result_no_hooks["success"]:
|
|
247
|
+
print(
|
|
248
|
+
f" ✅ 成功 - 响应时间: {result_no_hooks['response_time']:.2f}s, 长度: {result_no_hooks['response_length']} 字符"
|
|
249
|
+
)
|
|
250
|
+
else:
|
|
251
|
+
print(f" ❌ 失败 - {result_no_hooks.get('error', '未知错误')}")
|
|
252
|
+
|
|
253
|
+
print("开启 hooks:")
|
|
254
|
+
if result_with_hooks["success"]:
|
|
255
|
+
print(
|
|
256
|
+
f" ✅ 成功 - 响应时间: {result_with_hooks['response_time']:.2f}s, 长度: {result_with_hooks['response_length']} 字符"
|
|
257
|
+
)
|
|
258
|
+
else:
|
|
259
|
+
print(f" ❌ 失败 - {result_with_hooks.get('error', '未知错误')}")
|
|
260
|
+
|
|
261
|
+
# 性能对比
|
|
262
|
+
if result_no_hooks["success"] and result_with_hooks["success"]:
|
|
263
|
+
time_diff = (
|
|
264
|
+
result_with_hooks["response_time"] - result_no_hooks["response_time"]
|
|
265
|
+
)
|
|
266
|
+
length_diff = (
|
|
267
|
+
result_with_hooks["response_length"] - result_no_hooks["response_length"]
|
|
268
|
+
)
|
|
269
|
+
|
|
270
|
+
print("\n性能对比:")
|
|
271
|
+
print(
|
|
272
|
+
f" 时间差异: {time_diff:+.2f}s ({'hooks 更慢' if time_diff > 0 else 'hooks 更快'})"
|
|
273
|
+
)
|
|
274
|
+
print(
|
|
275
|
+
f" 长度差异: {length_diff:+d} 字符 ({'hooks 更长' if length_diff > 0 else 'hooks 更短'})"
|
|
276
|
+
)
|
|
277
|
+
|
|
278
|
+
if abs(time_diff) < 1.0:
|
|
279
|
+
print(" ✅ 时间差异在可接受范围内")
|
|
280
|
+
else:
|
|
281
|
+
print(" ⚠️ 时间差异较大,需要进一步优化")
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
if __name__ == "__main__":
|
|
285
|
+
main()
|
|
@@ -14,7 +14,7 @@ test_queries = [
|
|
|
14
14
|
"return_call_result": False,
|
|
15
15
|
},
|
|
16
16
|
},
|
|
17
|
-
{"name": "Tool_Finder_Keyword", "arguments": {"
|
|
17
|
+
{"name": "Tool_Finder_Keyword", "arguments": {"description": "disease", "limit": 5}},
|
|
18
18
|
]
|
|
19
19
|
|
|
20
20
|
for idx, query in enumerate(test_queries):
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tooluniverse
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.5
|
|
4
4
|
Summary: A comprehensive collection of scientific tools for Agentic AI, offering integration with the ToolUniverse SDK and MCP Server to support advanced scientific workflows.
|
|
5
5
|
Author-email: Shanghua Gao <shanghuagao@gmail.com>
|
|
6
|
-
Project-URL: Homepage, https://github.com/mims-harvard/
|
|
6
|
+
Project-URL: Homepage, https://github.com/mims-harvard/ToolUniverse
|
|
7
7
|
Requires-Python: >=3.10
|
|
8
8
|
Description-Content-Type: text/markdown
|
|
9
9
|
License-File: LICENSE
|
|
@@ -18,6 +18,7 @@ Requires-Dist: networkx>=3.4.0
|
|
|
18
18
|
Requires-Dist: openai>=1.107.0
|
|
19
19
|
Requires-Dist: pyyaml>=6.0.0
|
|
20
20
|
Requires-Dist: google-genai>=1.36.0
|
|
21
|
+
Requires-Dist: google-generativeai>=0.7.2
|
|
21
22
|
Requires-Dist: mcp[cli]>=1.9.3
|
|
22
23
|
Requires-Dist: fastmcp>=2.12.0
|
|
23
24
|
Requires-Dist: xmltodict>=1.0.0
|
|
@@ -37,19 +38,28 @@ Requires-Dist: aiohttp
|
|
|
37
38
|
Provides-Extra: dev
|
|
38
39
|
Requires-Dist: pytest>=6.0; extra == "dev"
|
|
39
40
|
Requires-Dist: pytest-cov>=2.0; extra == "dev"
|
|
41
|
+
Requires-Dist: pytest-timeout>=2.3.1; extra == "dev"
|
|
42
|
+
Requires-Dist: pytest-mock>=3.14.0; extra == "dev"
|
|
43
|
+
Requires-Dist: requests-mock>=1.12.1; extra == "dev"
|
|
40
44
|
Requires-Dist: black>=22.0; extra == "dev"
|
|
41
45
|
Requires-Dist: flake8>=4.0; extra == "dev"
|
|
42
46
|
Requires-Dist: pre-commit>=2.0; extra == "dev"
|
|
43
47
|
Provides-Extra: docs
|
|
44
48
|
Requires-Dist: sphinx>=4.0; extra == "docs"
|
|
49
|
+
Requires-Dist: furo>=2024.8.6; extra == "docs"
|
|
45
50
|
Requires-Dist: sphinx-rtd-theme>=1.0; extra == "docs"
|
|
46
51
|
Requires-Dist: myst-parser>=0.18; extra == "docs"
|
|
52
|
+
Requires-Dist: linkify-it-py>=2.0.0; extra == "docs"
|
|
47
53
|
Requires-Dist: sphinx-autobuild>=2021.3.14; extra == "docs"
|
|
48
54
|
Requires-Dist: sphinx-copybutton>=0.5.0; extra == "docs"
|
|
49
55
|
Requires-Dist: sphinx-tabs>=3.2.0; extra == "docs"
|
|
50
56
|
Requires-Dist: sphinx-design>=0.3.0; extra == "docs"
|
|
51
57
|
Requires-Dist: sphinx-notfound-page>=0.8; extra == "docs"
|
|
52
58
|
Requires-Dist: sphinx-autodoc-typehints>=1.12.0; extra == "docs"
|
|
59
|
+
Provides-Extra: embedding
|
|
60
|
+
Requires-Dist: sentence-transformers>=5.1.0; extra == "embedding"
|
|
61
|
+
Requires-Dist: faiss-cpu>=1.12.0; extra == "embedding"
|
|
62
|
+
Requires-Dist: huggingface_hub>=0.34.0; extra == "embedding"
|
|
53
63
|
Provides-Extra: graph
|
|
54
64
|
Requires-Dist: flask>=2.0.0; extra == "graph"
|
|
55
65
|
Requires-Dist: matplotlib>=3.5.0; extra == "graph"
|
|
@@ -65,11 +75,12 @@ Dynamic: license-file
|
|
|
65
75
|
|
|
66
76
|
# <img src="docs/_static/logo.png" alt="ToolUniverse Logo" height="28" style="vertical-align: middle; margin-right: 8px;" /> ToolUniverse: Democratizing AI scientists
|
|
67
77
|
|
|
78
|
+
[](https://arxiv.org/abs/2509.23426)
|
|
68
79
|
[](https://pypi.org/project/tooluniverse/)
|
|
69
80
|
[](https://github.com/mims-harvard/ToolUniverse)
|
|
70
81
|
[_Supported-green)](README_USAGE.md#running-the-mcp-server)
|
|
71
|
-
[](https://zitniklab.hms.harvard.edu/
|
|
72
|
-
[](https://zitniklab.hms.harvard.edu/ToolUniverse/)
|
|
83
|
+
[](https://aiscientist.tools)
|
|
73
84
|
[](https://join.slack.com/t/tooluniversehq/shared_invite/zt-3dic3eoio-5xxoJch7TLNibNQn5_AREQ)
|
|
74
85
|
|
|
75
86
|
|
|
@@ -83,27 +94,34 @@ ToolUniverse is an ecosystem for creating AI scientist systems from any open or
|
|
|
83
94
|
[](https://aiscientist.tools)
|
|
84
95
|
|
|
85
96
|
[](https://join.slack.com/t/tooluniversehq/shared_invite/zt-3dic3eoio-5xxoJch7TLNibNQn5_AREQ)
|
|
86
|
-
[](https://
|
|
97
|
+
[](https://aiscientist.tools/wechat)
|
|
87
98
|
|
|
88
99
|
[](https://www.linkedin.com/in/tooluniverse-at-harvard-b9aa88385/)
|
|
89
100
|
[](https://x.com/ScientistTools)
|
|
90
101
|
|
|
91
102
|
</div>
|
|
103
|
+
<p align="center">
|
|
104
|
+
<img src="https://github.com/user-attachments/assets/13ddb54c-4fcc-4507-8695-1c58e7bc1e68" width="600" />
|
|
105
|
+
</p>
|
|
92
106
|
|
|
93
|
-
→ **Complete Tool List**: [Available Tools](https://zitniklab.hms.harvard.edu/
|
|
107
|
+
→ **Complete Tool List**: [Available Tools](https://zitniklab.hms.harvard.edu/ToolUniverse/tools/tools_config_index.html)
|
|
94
108
|
|
|
95
109
|
→ **Check our website for direct tool usage**: [AIScientist.Tools](https://aiscientist.tools/)
|
|
96
110
|
|
|
97
111
|
|
|
98
112
|
## 🤖 Building AI Scientists with ToolUniverse in 5 minutes
|
|
99
|
-
- **[Overview](https://zitniklab.hms.harvard.edu/bioagent/guide/building_ai_scientists/index.html)**: Create AI scientists from any LLM
|
|
100
|
-
- **[Claude Desktop Integration](https://zitniklab.hms.harvard.edu/bioagent/guide/building_ai_scientists/claude_desktop.html)**: Native MCP integration with Claude Desktop App
|
|
101
|
-
- **[Claude Code Integration](https://zitniklab.hms.harvard.edu/bioagent/guide/building_ai_scientists/claude_code.html)**: AI scientist development in Claude Code environment
|
|
102
|
-
- **[Gemini CLI Integration](https://zitniklab.hms.harvard.edu/bioagent/guide/building_ai_scientists/gemini_cli.html)**: Command-line scientific research with Google Gemini
|
|
103
|
-
- **[Qwen Code Integration](https://zitniklab.hms.harvard.edu/bioagent/guide/building_ai_scientists/qwen_code.html)**: AI scientist workflows in Qwen Code environment
|
|
104
|
-
- **[GPT Codex CLI Integration](https://zitniklab.hms.harvard.edu/bioagent/guide/building_ai_scientists/codex_cli.html)**: Terminal-based research with OpenAI Codex
|
|
105
|
-
- **[ChatGPT API Integration](https://zitniklab.hms.harvard.edu/bioagent/guide/building_ai_scientists/chatgpt_api.html)**: Programmatic research with ChatGPT function calling
|
|
106
113
|
|
|
114
|
+
[](https://www.youtube.com/watch?v=fManSJlSs60)
|
|
115
|
+
*Click the image above to watch the ToolUniverse demonstration*
|
|
116
|
+
[(Also in Bilibili)](https://www.bilibili.com/video/BV1GynhzjEos/?share_source=copy_web&vd_source=b398f13447281e748f5c41057a2c6858)
|
|
117
|
+
|
|
118
|
+
- **[Overview](https://zitniklab.hms.harvard.edu/ToolUniverse/guide/building_ai_scientists/index.html)**: Create AI scientists from any LLM
|
|
119
|
+
- **[Claude Desktop Integration](https://zitniklab.hms.harvard.edu/ToolUniverse/guide/building_ai_scientists/claude_desktop.html)**: Native MCP integration with Claude Desktop App
|
|
120
|
+
- **[Claude Code Integration](https://zitniklab.hms.harvard.edu/ToolUniverse/guide/building_ai_scientists/claude_code.html)**: AI scientist development in Claude Code environment
|
|
121
|
+
- **[Gemini CLI Integration](https://zitniklab.hms.harvard.edu/ToolUniverse/guide/building_ai_scientists/gemini_cli.html)**: Command-line scientific research with Google Gemini
|
|
122
|
+
- **[Qwen Code Integration](https://zitniklab.hms.harvard.edu/ToolUniverse/guide/building_ai_scientists/qwen_code.html)**: AI scientist workflows in Qwen Code environment
|
|
123
|
+
- **[GPT Codex CLI Integration](https://zitniklab.hms.harvard.edu/ToolUniverse/guide/building_ai_scientists/codex_cli.html)**: Terminal-based research with OpenAI Codex
|
|
124
|
+
- **[ChatGPT API Integration](https://zitniklab.hms.harvard.edu/ToolUniverse/guide/building_ai_scientists/chatgpt_api.html)**: Programmatic research with ChatGPT function calling
|
|
107
125
|
|
|
108
126
|
## 🔬 What is ToolUniverse?
|
|
109
127
|
|
|
@@ -113,18 +131,19 @@ ToolUniverse addresses this challenge by providing a standardized ecosystem that
|
|
|
113
131
|
|
|
114
132
|
**Key Features:**
|
|
115
133
|
|
|
116
|
-
- [**AI-Tool Interaction Protocol**](https://zitniklab.hms.harvard.edu/
|
|
117
|
-
- [**Universal AI Model Support**](https://zitniklab.hms.harvard.edu/
|
|
118
|
-
- [**
|
|
119
|
-
- [**
|
|
120
|
-
- [**
|
|
121
|
-
- [**
|
|
122
|
-
|
|
134
|
+
- [**AI-Tool Interaction Protocol**](https://zitniklab.hms.harvard.edu/ToolUniverse/guide/interaction_protocol.html): Standardized interface governing how AI scientists issue tool requests and receive results
|
|
135
|
+
- [**Universal AI Model Support**](https://zitniklab.hms.harvard.edu/ToolUniverse/guide/building_ai_scientists/index.html): Works with any LLM, AI agent, or large reasoning model (GPT5, Claude, Gemini, Qwen, Deepseek, open models)
|
|
136
|
+
- [**OpenRouter Integration**](https://zitniklab.hms.harvard.edu/ToolUniverse/guide/openrouter_support.html): Access 100+ models from OpenAI, Anthropic, Google, Qwen, and more through a single API
|
|
137
|
+
- [**Easy to Load & Find & Call Tool**](https://zitniklab.hms.harvard.edu/ToolUniverse/guide/index.html) (*[WebService](https://aiscientist.tools/), [PythonAPI](https://zitniklab.hms.harvard.edu/ToolUniverse/api/modules.html), [MCP](https://zitniklab.hms.harvard.edu/ToolUniverse/guide/mcp_support.html)*): Maps natural-language descriptions to tool specifications and executes tools with structured results
|
|
138
|
+
- [**Tool Composition & Scientific Workflows**](https://zitniklab.hms.harvard.edu/ToolUniverse/guide/tool_composition.html): Chains tools for sequential or parallel execution in self-directed scientific workflows
|
|
139
|
+
- [**Continuous Expansion**](https://zitniklab.hms.harvard.edu/ToolUniverse/expand_tooluniverse/index.html): New tools can be easily registered locally or remotely without additional configuration
|
|
140
|
+
- [**Multi-Agent Tool Creation & Optimization**](https://zitniklab.hms.harvard.edu/ToolUniverse/guide/scientific_workflows.html): Multi-agent powered tool construction and iterative tool optimization
|
|
123
141
|
|
|
142
|
+
<p align="center">
|
|
143
|
+
<img src="https://github.com/user-attachments/assets/eb15bd7c-4e73-464b-8d65-733877c96a51" width="888" />
|
|
144
|
+
</p>
|
|
124
145
|
|
|
125
146
|
|
|
126
|
-
<!--  -->
|
|
127
|
-
|
|
128
147
|
## 🚀 Quick Start
|
|
129
148
|
|
|
130
149
|
```python
|
|
@@ -142,17 +161,17 @@ tu.load_tools() # Load 600+ scientific tools
|
|
|
142
161
|
# 3. Use Find Tool operation to discover relevant tools
|
|
143
162
|
tools = tu.run({
|
|
144
163
|
"name": "Tool_Finder_Keyword",
|
|
145
|
-
"arguments": {"
|
|
164
|
+
"arguments": {"description": "disease target associations", "limit": 10}
|
|
146
165
|
})
|
|
147
166
|
|
|
148
167
|
# 4. Use Call Tool operation to execute selected tool
|
|
149
168
|
result = tu.run({
|
|
150
169
|
"name": "OpenTargets_get_associated_targets_by_disease_efoId",
|
|
151
|
-
"arguments": {"efoId": "
|
|
170
|
+
"arguments": {"efoId": "EFO_0000537"} # hypertension
|
|
152
171
|
})
|
|
153
172
|
```
|
|
154
173
|
|
|
155
|
-
→ **Complete Quick Start Tutorial**: [Quick Start Tutorial](https://zitniklab.hms.harvard.edu/
|
|
174
|
+
→ **Complete Quick Start Tutorial**: [Quick Start Tutorial](https://zitniklab.hms.harvard.edu/ToolUniverse/quickstart.html) [Getting Started Tutorial](https://zitniklab.hms.harvard.edu/ToolUniverse/getting_started.html)
|
|
156
175
|
|
|
157
176
|
|
|
158
177
|
## 📦 Installation
|
|
@@ -163,7 +182,7 @@ result = tu.run({
|
|
|
163
182
|
uv pip install tooluniverse
|
|
164
183
|
```
|
|
165
184
|
|
|
166
|
-
→ **Complete Installation Tutorial**: [Installation Tutorial](https://zitniklab.hms.harvard.edu/
|
|
185
|
+
→ **Complete Installation Tutorial**: [Installation Tutorial](https://zitniklab.hms.harvard.edu/ToolUniverse/installation.html)
|
|
167
186
|
|
|
168
187
|
## 🔧 Usage & Integration
|
|
169
188
|
|
|
@@ -181,17 +200,18 @@ tu.load_tools()
|
|
|
181
200
|
# Find relevant tools
|
|
182
201
|
tools = tu.run({
|
|
183
202
|
"name": "Tool_Finder_Keyword", # Tool_Finder (Embedding model, GPU required), Tool_Finder_LLM (LLM-based model)
|
|
184
|
-
"arguments": {"
|
|
203
|
+
"arguments": {"description": "protein structure prediction", "limit": 10}
|
|
185
204
|
})
|
|
186
205
|
|
|
187
206
|
# Execute tools
|
|
188
207
|
result = tu.run({
|
|
189
|
-
"name": "
|
|
190
|
-
"arguments": {"
|
|
208
|
+
"name": "UniProt_get_function_by_accession",
|
|
209
|
+
"arguments": {"accession": "P05067"}
|
|
191
210
|
})
|
|
211
|
+
|
|
192
212
|
```
|
|
193
213
|
|
|
194
|
-
→ **Complete Tutorials**: [Installation Tutorial](https://zitniklab.hms.harvard.edu/
|
|
214
|
+
→ **Complete Tutorials**: [Installation Tutorial](https://zitniklab.hms.harvard.edu/ToolUniverse/installation.html)
|
|
195
215
|
|
|
196
216
|
### MCP Support
|
|
197
217
|
|
|
@@ -199,7 +219,7 @@ result = tu.run({
|
|
|
199
219
|
# run one command to launch the tooluniverse mcp server
|
|
200
220
|
tooluniverse-smcp
|
|
201
221
|
```
|
|
202
|
-
→ **Complete Tutorial**: [MCP Support](https://zitniklab.hms.harvard.edu/
|
|
222
|
+
→ **Complete Tutorial**: [MCP Support](https://zitniklab.hms.harvard.edu/ToolUniverse/guide/mcp_support.html)
|
|
203
223
|
|
|
204
224
|
|
|
205
225
|
## 🚀 AI Scientists Projects Powered by ToolUniverse
|
|
@@ -212,9 +232,11 @@ tooluniverse-smcp
|
|
|
212
232
|
|
|
213
233
|
|
|
214
234
|
---
|
|
215
|
-
**Hypercholesterolemia Drug Discovery** [[Tutorial]](https://zitniklab.hms.harvard.edu/
|
|
235
|
+
**Hypercholesterolemia Drug Discovery** [[Tutorial]](https://zitniklab.hms.harvard.edu/ToolUniverse/tutorials/tooluniverse_case_study.html) [[Code]](https://colab.research.google.com/drive/1UwJ6RwyUoqI5risKQ365EeFdDQWOeOCv?usp=sharing)
|
|
236
|
+
<p align="center">
|
|
237
|
+
<img src="https://github.com/user-attachments/assets/cc53e9b0-94d3-407d-a015-71762ddb9836" width="600" />
|
|
238
|
+
</p>
|
|
216
239
|
|
|
217
|
-
---
|
|
218
240
|
|
|
219
241
|
|
|
220
242
|
## 🤝 Contribution and Community
|
|
@@ -227,7 +249,7 @@ Please join our [Slack Channel](https://join.slack.com/t/tooluniversehq/shared_i
|
|
|
227
249
|
- **Report Issues**: [GitHub Issues](https://github.com/mims-harvard/ToolUniverse/issues)
|
|
228
250
|
- **Join Discussions**: [Slack Channel](https://github.com/mims-harvard/ToolUniverse/discussions)
|
|
229
251
|
- **Contact**: Reach out to [Shanghua Gao](shanghuagao@gmail.com)/[Marinka Zitnik](marinka@hms.harvard.edu)
|
|
230
|
-
- **Contribute**: See our [Contributing Tutorial](https://zitniklab.hms.harvard.edu/
|
|
252
|
+
- **Contribute**: See our [Contributing Tutorial](https://zitniklab.hms.harvard.edu/ToolUniverse/expand_tooluniverse/comprehensive_tool_guide.html)
|
|
231
253
|
|
|
232
254
|
|
|
233
255
|
|
|
@@ -235,10 +257,10 @@ Please join our [Slack Channel](https://join.slack.com/t/tooluniversehq/shared_i
|
|
|
235
257
|
|
|
236
258
|
- **[Shanghua Gao](https://shgao.site)**
|
|
237
259
|
- **[Richard Zhu](https://www.linkedin.com/in/richard-zhu-4236901a7/)**
|
|
238
|
-
- **[Pengwei Sui](
|
|
260
|
+
- **[Pengwei Sui](https://psui3905.github.io/)**
|
|
239
261
|
- **[Zhenglun Kong](https://zlkong.github.io/homepage/)**
|
|
240
262
|
- **[Sufian Aldogom](mailto:saldogom@mit.edu)**
|
|
241
|
-
- **[Yepeng Huang](
|
|
263
|
+
- **[Yepeng Huang](https://yepeng.notion.site/Yepeng-Huang-16ad8dd1740080c28d4bd3e3d7c1080c)**
|
|
242
264
|
- **[Ayush Noori](https://www.ayushnoori.com/)**
|
|
243
265
|
- **[Reza Shamji](mailto:reza_shamji@hms.harvard.edu)**
|
|
244
266
|
- **[Krishna Parvataneni](mailto:krishna_parvataneni@hms.harvard.edu)**
|
|
@@ -252,53 +274,63 @@ Please join our [Slack Channel](https://join.slack.com/t/tooluniversehq/shared_i
|
|
|
252
274
|
Our comprehensive documentation covers everything from quick start to advanced workflows:
|
|
253
275
|
|
|
254
276
|
### 🚀 Getting Started
|
|
255
|
-
- **[Quick Start Tutorial](https://zitniklab.hms.harvard.edu/
|
|
256
|
-
- **[Installation](https://zitniklab.hms.harvard.edu/
|
|
257
|
-
- **[Getting Started](https://zitniklab.hms.harvard.edu/
|
|
258
|
-
- **[AI-Tool Protocol](https://zitniklab.hms.harvard.edu/
|
|
277
|
+
- **[Quick Start Tutorial](https://zitniklab.hms.harvard.edu/ToolUniverse/quickstart.html)**: 5-minute setup and first query
|
|
278
|
+
- **[Installation](https://zitniklab.hms.harvard.edu/ToolUniverse/installation.html)**: Complete installation options
|
|
279
|
+
- **[Getting Started](https://zitniklab.hms.harvard.edu/ToolUniverse/getting_started.html)**: Step-by-step tutorial
|
|
280
|
+
- **[AI-Tool Protocol](https://zitniklab.hms.harvard.edu/ToolUniverse/guide/interaction_protocol.html)**: Understanding the interaction protocol
|
|
259
281
|
|
|
260
282
|
### 📖 User Guides
|
|
261
|
-
- **[Loading Tools](https://zitniklab.hms.harvard.edu/
|
|
262
|
-
- **[Tool Discovery](https://zitniklab.hms.harvard.edu/
|
|
263
|
-
- **[Tool Caller](https://zitniklab.hms.harvard.edu/
|
|
264
|
-
- **[Tool Composition](https://zitniklab.hms.harvard.edu/
|
|
265
|
-
- **[Scientific Workflows](https://zitniklab.hms.harvard.edu/
|
|
266
|
-
- **[MCP Support](https://zitniklab.hms.harvard.edu/
|
|
267
|
-
- **[Logging](https://zitniklab.hms.harvard.edu/
|
|
283
|
+
- **[Loading Tools](https://zitniklab.hms.harvard.edu/ToolUniverse/guide/loading_tools.html)**: Complete Tutorial to loading tools
|
|
284
|
+
- **[Tool Discovery](https://zitniklab.hms.harvard.edu/ToolUniverse/tutorials/finding_tools.html)**: Find tools by keyword, LLM, and embedding search
|
|
285
|
+
- **[Tool Caller](https://zitniklab.hms.harvard.edu/ToolUniverse/guide/tool_caller.html)**: Primary execution engine
|
|
286
|
+
- **[Tool Composition](https://zitniklab.hms.harvard.edu/ToolUniverse/guide/tool_composition.html)**: Chain tools into workflows
|
|
287
|
+
- **[Scientific Workflows](https://zitniklab.hms.harvard.edu/ToolUniverse/guide/scientific_workflows.html)**: Real-world research scenarios
|
|
288
|
+
- **[MCP Support](https://zitniklab.hms.harvard.edu/ToolUniverse/guide/mcp_support.html)**: Model Context Protocol integration
|
|
289
|
+
- **[Logging](https://zitniklab.hms.harvard.edu/ToolUniverse/guide/logging.html)**: Comprehensive logging configuration
|
|
268
290
|
|
|
269
291
|
### 🛠️ Advanced Features
|
|
270
|
-
- **[Hooks System](https://zitniklab.hms.harvard.edu/
|
|
271
|
-
- **[Hook Configuration](https://zitniklab.hms.harvard.edu/
|
|
272
|
-
- **[File Save Hook](https://zitniklab.hms.harvard.edu/
|
|
273
|
-
- **[Summarization Hook](https://zitniklab.hms.harvard.edu/
|
|
274
|
-
- **[Server Stdio Hooks](https://zitniklab.hms.harvard.edu/
|
|
275
|
-
- **[Expert Feedback](https://zitniklab.hms.harvard.edu/
|
|
276
|
-
- **[Agentic Tools](https://zitniklab.hms.harvard.edu/
|
|
277
|
-
- **[Case Study](https://zitniklab.hms.harvard.edu/
|
|
278
|
-
- **[Tool Optimization](https://zitniklab.hms.harvard.edu/
|
|
292
|
+
- **[Hooks System](https://zitniklab.hms.harvard.edu/ToolUniverse/guide/hooks/index.html)**: Intelligent output processing
|
|
293
|
+
- **[Hook Configuration](https://zitniklab.hms.harvard.edu/ToolUniverse/guide/hooks/hook_configuration.html)**: Configure hooks for different outputs
|
|
294
|
+
- **[File Save Hook](https://zitniklab.hms.harvard.edu/ToolUniverse/guide/hooks/file_save_hook.html)**: Save tool outputs to files
|
|
295
|
+
- **[Summarization Hook](https://zitniklab.hms.harvard.edu/ToolUniverse/guide/hooks/summarization_hook.html)**: Summarize tool outputs
|
|
296
|
+
- **[Server Stdio Hooks](https://zitniklab.hms.harvard.edu/ToolUniverse/guide/hooks/server_stdio_hooks.html)**: Server communication hooks
|
|
297
|
+
- **[Expert Feedback](https://zitniklab.hms.harvard.edu/ToolUniverse/tutorials/expert_feedback.html)**: Human-in-the-loop consultation
|
|
298
|
+
- **[Agentic Tools](https://zitniklab.hms.harvard.edu/ToolUniverse/tutorials/agentic_tools_tutorial.html)**: AI-powered tool development
|
|
299
|
+
- **[Case Study](https://zitniklab.hms.harvard.edu/ToolUniverse/tutorials/tooluniverse_case_study.html)**: End-to-end drug discovery workflow
|
|
300
|
+
- **[Tool Optimization](https://zitniklab.hms.harvard.edu/ToolUniverse/tutorials/optimization/Tool_Description_Optimizer_Tutorial.html)**: Optimize tool descriptions for better performance
|
|
279
301
|
|
|
280
302
|
### 🔧 Expanding ToolUniverse
|
|
281
|
-
- **[Architecture](https://zitniklab.hms.harvard.edu/
|
|
282
|
-
- **[Local Tool Registration](https://zitniklab.hms.harvard.edu/
|
|
283
|
-
- **[Remote Tool Registration](https://zitniklab.hms.harvard.edu/
|
|
284
|
-
- **[Contributing Tools](https://zitniklab.hms.harvard.edu/
|
|
285
|
-
- **[Adding Tools Tutorial](https://zitniklab.hms.harvard.edu/
|
|
286
|
-
- **[MCP Tool Registration](https://zitniklab.hms.harvard.edu/
|
|
303
|
+
- **[Architecture](https://zitniklab.hms.harvard.edu/ToolUniverse/expand_tooluniverse/architecture.html)**: System architecture overview
|
|
304
|
+
- **[Local Tool Registration](https://zitniklab.hms.harvard.edu/ToolUniverse/expand_tooluniverse/local_tool_registration.html)**: Create custom tools
|
|
305
|
+
- **[Remote Tool Registration](https://zitniklab.hms.harvard.edu/ToolUniverse/expand_tooluniverse/remote_tool_registration.html)**: Integrate external services
|
|
306
|
+
- **[Contributing Tools](https://zitniklab.hms.harvard.edu/ToolUniverse/expand_tooluniverse/comprehensive_tool_guide.html)**: Complete contribution guide
|
|
307
|
+
- **[Adding Tools Tutorial](https://zitniklab.hms.harvard.edu/ToolUniverse/tutorials/addtools/Adding_Tools_Tutorial.html)**: Step-by-step tool addition guide
|
|
308
|
+
- **[MCP Tool Registration](https://zitniklab.hms.harvard.edu/ToolUniverse/tutorials/addtools/mcp_tool_registration_en.html)**: Register tools via MCP
|
|
287
309
|
|
|
288
310
|
### 📚 API Reference
|
|
289
|
-
- **[API Directory](https://zitniklab.hms.harvard.edu/
|
|
290
|
-
- **[Core Modules](https://zitniklab.hms.harvard.edu/
|
|
291
|
-
- **[Tool Classes](https://zitniklab.hms.harvard.edu/
|
|
292
|
-
- **[Compose Scripts](https://zitniklab.hms.harvard.edu/
|
|
293
|
-
- **[MCP Integration](https://zitniklab.hms.harvard.edu/
|
|
311
|
+
- **[API Directory](https://zitniklab.hms.harvard.edu/ToolUniverse/api/modules.html)**: Complete module listing
|
|
312
|
+
- **[Core Modules](https://zitniklab.hms.harvard.edu/ToolUniverse/api/tooluniverse.html)**: Main ToolUniverse class and utilities
|
|
313
|
+
- **[Tool Classes](https://zitniklab.hms.harvard.edu/ToolUniverse/api/tooluniverse.base_tool.html)**: Base tool classes and implementations
|
|
314
|
+
- **[Compose Scripts](https://zitniklab.hms.harvard.edu/ToolUniverse/api/tooluniverse.compose_scripts.html)**: Tool composition utilities
|
|
315
|
+
- **[MCP Integration](https://zitniklab.hms.harvard.edu/ToolUniverse/api/tooluniverse.mcp_integration.html)**: Model Context Protocol support
|
|
294
316
|
|
|
295
|
-
→ **Browse All Documentation**: [ToolUniverse Documentation](https://zitniklab.hms.harvard.edu/
|
|
317
|
+
→ **Browse All Documentation**: [ToolUniverse Documentation](https://zitniklab.hms.harvard.edu/ToolUniverse/)
|
|
296
318
|
|
|
297
319
|
|
|
298
320
|
### Citation
|
|
299
321
|
|
|
300
322
|
```
|
|
301
|
-
@
|
|
323
|
+
@article{gao2025democratizingaiscientistsusing,
|
|
324
|
+
title={Democratizing AI scientists using ToolUniverse},
|
|
325
|
+
author={Shanghua Gao and Richard Zhu and Pengwei Sui and Zhenglun Kong and Sufian Aldogom and Yepeng Huang and Ayush Noori and Reza Shamji and Krishna Parvataneni and Theodoros Tsiligkaridis and Marinka Zitnik},
|
|
326
|
+
year={2025},
|
|
327
|
+
eprint={2509.23426},
|
|
328
|
+
archivePrefix={arXiv},
|
|
329
|
+
primaryClass={cs.AI},
|
|
330
|
+
url={https://arxiv.org/abs/2509.23426},
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
@article{gao2025txagent,
|
|
302
334
|
title={TxAgent: An AI Agent for Therapeutic Reasoning Across a Universe of Tools},
|
|
303
335
|
author={Shanghua Gao and Richard Zhu and Zhenglun Kong and Ayush Noori and Xiaorui Su and Curtis Ginder and Theodoros Tsiligkaridis and Marinka Zitnik},
|
|
304
336
|
year={2025},
|
|
@@ -309,11 +341,6 @@ Our comprehensive documentation covers everything from quick start to advanced w
|
|
|
309
341
|
}
|
|
310
342
|
```
|
|
311
343
|
|
|
312
|
-
|
|
313
|
-
### Acknowledgments
|
|
314
|
-
|
|
315
|
-
ToolUniverse is developed by the [Zitnik Lab](https://zitniklab.hms.harvard.edu/) at Harvard Medical School in collaboration with MIT Lincoln Laboratory. We thank the scientific community for their valuable feedback and contributions.
|
|
316
|
-
|
|
317
344
|
---
|
|
318
345
|
|
|
319
346
|
*Democratizing AI agents for science with ToolUniverse.*
|