tooluniverse 0.1.3__py3-none-any.whl → 0.2.0__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/data/fda_drug_labeling_tools.json +543 -167
- tooluniverse/data/opentarget_tools.json +81 -57
- tooluniverse/generate_mcp_tools.py +113 -0
- tooluniverse/graphql_tool.py +1 -1
- tooluniverse/mcp_server.py +3340 -0
- tooluniverse/openfda_tool.py +2 -1
- {tooluniverse-0.1.3.dist-info → tooluniverse-0.2.0.dist-info}/METADATA +23 -24
- tooluniverse-0.2.0.dist-info/RECORD +21 -0
- {tooluniverse-0.1.3.dist-info → tooluniverse-0.2.0.dist-info}/WHEEL +1 -1
- tooluniverse-0.2.0.dist-info/entry_points.txt +4 -0
- tooluniverse-0.1.3.dist-info/RECORD +0 -18
- {tooluniverse-0.1.3.dist-info → tooluniverse-0.2.0.dist-info/licenses}/LICENSE +0 -0
- {tooluniverse-0.1.3.dist-info → tooluniverse-0.2.0.dist-info}/top_level.txt +0 -0
tooluniverse/openfda_tool.py
CHANGED
|
@@ -3,6 +3,7 @@ from .base_tool import BaseTool
|
|
|
3
3
|
import copy
|
|
4
4
|
import re
|
|
5
5
|
import json
|
|
6
|
+
import os
|
|
6
7
|
|
|
7
8
|
def check_keys_present(api_capabilities_dict, keys):
|
|
8
9
|
for key in keys:
|
|
@@ -219,7 +220,7 @@ class FDATool(BaseTool):
|
|
|
219
220
|
if self.exists is None:
|
|
220
221
|
self.exists = self.return_fields
|
|
221
222
|
self.endpoint_url = endpoint_url
|
|
222
|
-
self.api_key = api_key
|
|
223
|
+
self.api_key = api_key or os.getenv('FDA_API_KEY')
|
|
223
224
|
|
|
224
225
|
def run(self, arguments):
|
|
225
226
|
arguments = copy.deepcopy(arguments)
|
|
@@ -1,16 +1,21 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: tooluniverse
|
|
3
|
-
Version: 0.
|
|
4
|
-
Summary: A collection of biomedical tools
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Requires-Python: >=3.6
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: A comprehensive collection of biomedical tools for Agentic AI, offering integration with the ToolUniverse SDK and MCP Server to support advanced biomedical workflows.
|
|
5
|
+
Author-email: Shanghua Gao <shanghuagao@gmail.com>
|
|
6
|
+
Project-URL: Homepage, https://github.com/mims-harvard/TxAgent
|
|
7
|
+
Requires-Python: >=3.10
|
|
9
8
|
Description-Content-Type: text/markdown
|
|
10
9
|
License-File: LICENSE
|
|
11
10
|
Requires-Dist: requests
|
|
12
11
|
Requires-Dist: numpy
|
|
13
12
|
Requires-Dist: graphql-core
|
|
13
|
+
Requires-Dist: fastapi
|
|
14
|
+
Requires-Dist: uvicorn
|
|
15
|
+
Requires-Dist: fastmcp
|
|
16
|
+
Requires-Dist: pydantic
|
|
17
|
+
Requires-Dist: pyyaml
|
|
18
|
+
Dynamic: license-file
|
|
14
19
|
|
|
15
20
|
# ToolUniverse
|
|
16
21
|
|
|
@@ -21,6 +26,7 @@ Requires-Dist: graphql-core
|
|
|
21
26
|
[](https://github.com/mims-harvard/TxAgent)
|
|
22
27
|
[](https://github.com/mims-harvard/ToolUniverse)
|
|
23
28
|
[](https://huggingface.co/collections/mims-harvard/txagent-67c8e54a9d03a429bb0c622c)
|
|
29
|
+
[_Supported-green)](README_USAGE.md#running-the-mcp-server)
|
|
24
30
|
|
|
25
31
|
<body>
|
|
26
32
|
<section class="hero">
|
|
@@ -101,26 +107,13 @@ pip install tooluniverse
|
|
|
101
107
|
|
|
102
108
|
# Usage
|
|
103
109
|
|
|
104
|
-
|
|
110
|
+
ToolUniverse supports both a Python SDK and an MCP server interface.
|
|
111
|
+
- You can use the Python SDK to interact with ToolUniverse programmatically in your Python projects.
|
|
112
|
+
- You can connect to the ToolUniverse MCP server for remote tool execution and integration with other agentic systems.
|
|
105
113
|
|
|
106
|
-
|
|
107
|
-
from tooluniverse import ToolUniverse
|
|
108
|
-
tooluni = ToolUniverse()
|
|
109
|
-
tooluni.load_tools()
|
|
110
|
-
tool_name_list, tool_desc_list = tooluni.refresh_tool_name_desc()
|
|
111
|
-
print(tool_name_list)
|
|
112
|
-
print(tool_desc_list)
|
|
113
|
-
```
|
|
114
|
+
For more detailed usage examples, see the [README_USAGE](README_USAGE.md) page.
|
|
114
115
|
|
|
115
|
-
**Function call to a tool**
|
|
116
116
|
|
|
117
|
-
```
|
|
118
|
-
from tooluniverse import ToolUniverse
|
|
119
|
-
tooluni = ToolUniverse()
|
|
120
|
-
tooluni.load_tools()
|
|
121
|
-
query = {"name": "get_indications_by_drug_name", "arguments": {"drug_name": "KISUNLA"}}
|
|
122
|
-
tooluni.run(query)
|
|
123
|
-
```
|
|
124
117
|
## Citation
|
|
125
118
|
|
|
126
119
|
```
|
|
@@ -138,3 +131,9 @@ tooluni.run(query)
|
|
|
138
131
|
## Contact
|
|
139
132
|
If you have any questions or suggestions, please email [Shanghua Gao](mailto:shanghuagao@gmail.com) and [Marinka Zitnik](mailto:marinka@hms.harvard.edu).
|
|
140
133
|
|
|
134
|
+
## Core contributors
|
|
135
|
+
|
|
136
|
+
[Shanghua Gao](https://shgao.site);
|
|
137
|
+
[Richard Zhu](https://www.linkedin.com/in/richard-zhu-4236901a7/);
|
|
138
|
+
[Zhenglun Kong](https://zlkong.github.io/homepage/);
|
|
139
|
+
[Sufian Aldogom](saldogom@mit.edu)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
tooluniverse/__init__.py,sha256=j44hf13WM50HQJRi7aloeTG6y6872wJtfX8ydsaiJFI,652
|
|
2
|
+
tooluniverse/base_tool.py,sha256=WMGgr02lhEsVzHgt7NIeynXQ2wZtu97yZI-lQWOSoSs,1145
|
|
3
|
+
tooluniverse/execute_function.py,sha256=CmA8AIfyolkcooASD2_3pXgF1BqESU5_VUqdHSYiM_M,10139
|
|
4
|
+
tooluniverse/generate_mcp_tools.py,sha256=LXE6cZzkbuMZbqL5Z0OKfOOYGjttowYFIIXJzlPfv4U,3166
|
|
5
|
+
tooluniverse/graphql_tool.py,sha256=WU-9YAYbmfbfGwGDn7Y22DVju9t68CKuv_JNz_11NkM,5120
|
|
6
|
+
tooluniverse/mcp_server.py,sha256=9xlhWBCk0GLSwS6G4KPxvpeggSqFeqvBbMv6Q9zlXcA,75841
|
|
7
|
+
tooluniverse/openfda_tool.py,sha256=s4ctA7ckID7VA1wRceRGknFV5zu9sR7fqTJ8oa9U0q4,21056
|
|
8
|
+
tooluniverse/restful_tool.py,sha256=5HoTyCSd507D4Qjcqjd16o8Y4BFZ02Zm4cGuczIXWdw,4078
|
|
9
|
+
tooluniverse/utils.py,sha256=zh1IopojPBIJzK_8eGytTmWlPckluQQZTpiCQONw-pY,6416
|
|
10
|
+
tooluniverse/data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
|
+
tooluniverse/data/fda_drug_labeling_tools.json,sha256=2mChXxdDaP4qo8GqRYm6rK-Gsazryewb4ark2IxaauQ,224727
|
|
12
|
+
tooluniverse/data/fda_drugs_with_brand_generic_names_for_tool.py,sha256=Clb7kQpPaXPTT_rdDLoinfwF8JbrdRaBis-0TYcT0BU,6510589
|
|
13
|
+
tooluniverse/data/monarch_tools.json,sha256=I5KvamNZRvkKBaKbM6Ypo333m-RejQhqScX8h-uket4,3567
|
|
14
|
+
tooluniverse/data/opentarget_tools.json,sha256=vQQJsTGIoZWeqInUHmsdwp8kpqzx51f-VVaAVRmJdcU,67794
|
|
15
|
+
tooluniverse/data/special_tools.json,sha256=tOI0TFpdjZBEE5Af1Vc4CeXQ0gAkz39xho9hDVBYR70,1518
|
|
16
|
+
tooluniverse-0.2.0.dist-info/licenses/LICENSE,sha256=Unq9Y3buGL9J0vFop03FYZiVweytt1xdgLIh2n9ck2c,1115
|
|
17
|
+
tooluniverse-0.2.0.dist-info/METADATA,sha256=ZSkaURh0dRXEdXdZrMvewggnp3f9aZkBAgDhU73deKY,5729
|
|
18
|
+
tooluniverse-0.2.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
19
|
+
tooluniverse-0.2.0.dist-info/entry_points.txt,sha256=qDvySLz4M6uQDTwVvw-9zeLJ5jUir1aDdWbUrRqq6Bc,207
|
|
20
|
+
tooluniverse-0.2.0.dist-info/top_level.txt,sha256=zZ8YeCJ5FAkEwdd_mxsFtSCQMBDgBdxrrmHo3RNBiWs,13
|
|
21
|
+
tooluniverse-0.2.0.dist-info/RECORD,,
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
tooluniverse/__init__.py,sha256=j44hf13WM50HQJRi7aloeTG6y6872wJtfX8ydsaiJFI,652
|
|
2
|
-
tooluniverse/base_tool.py,sha256=WMGgr02lhEsVzHgt7NIeynXQ2wZtu97yZI-lQWOSoSs,1145
|
|
3
|
-
tooluniverse/execute_function.py,sha256=CmA8AIfyolkcooASD2_3pXgF1BqESU5_VUqdHSYiM_M,10139
|
|
4
|
-
tooluniverse/graphql_tool.py,sha256=FpyP70ZiQkd031crECAhZ7CbXBor8x6S-n48VICnxVs,5086
|
|
5
|
-
tooluniverse/openfda_tool.py,sha256=wSelkQiOn0hqMzoqflw3lOFnyT8a1q5A6hSc8YyOgx8,21018
|
|
6
|
-
tooluniverse/restful_tool.py,sha256=5HoTyCSd507D4Qjcqjd16o8Y4BFZ02Zm4cGuczIXWdw,4078
|
|
7
|
-
tooluniverse/utils.py,sha256=zh1IopojPBIJzK_8eGytTmWlPckluQQZTpiCQONw-pY,6416
|
|
8
|
-
tooluniverse/data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
-
tooluniverse/data/fda_drug_labeling_tools.json,sha256=iRYkuNk6ohCbNELMbfPghtlCGthjzZch_9Ukr-yjaJI,209383
|
|
10
|
-
tooluniverse/data/fda_drugs_with_brand_generic_names_for_tool.py,sha256=Clb7kQpPaXPTT_rdDLoinfwF8JbrdRaBis-0TYcT0BU,6510589
|
|
11
|
-
tooluniverse/data/monarch_tools.json,sha256=I5KvamNZRvkKBaKbM6Ypo333m-RejQhqScX8h-uket4,3567
|
|
12
|
-
tooluniverse/data/opentarget_tools.json,sha256=nNvl-vYqS8nLfyIvHO40Fsnx6HJxwInUuS0mrrh6xmY,66201
|
|
13
|
-
tooluniverse/data/special_tools.json,sha256=tOI0TFpdjZBEE5Af1Vc4CeXQ0gAkz39xho9hDVBYR70,1518
|
|
14
|
-
tooluniverse-0.1.3.dist-info/LICENSE,sha256=Unq9Y3buGL9J0vFop03FYZiVweytt1xdgLIh2n9ck2c,1115
|
|
15
|
-
tooluniverse-0.1.3.dist-info/METADATA,sha256=zx-hLNaex1UJcSD2LZlBFAL2Y5iUKRn_i1c1uhLKfxY,5198
|
|
16
|
-
tooluniverse-0.1.3.dist-info/WHEEL,sha256=beeZ86-EfXScwlR_HKu4SllMC9wUEj_8Z_4FJ3egI2w,91
|
|
17
|
-
tooluniverse-0.1.3.dist-info/top_level.txt,sha256=zZ8YeCJ5FAkEwdd_mxsFtSCQMBDgBdxrrmHo3RNBiWs,13
|
|
18
|
-
tooluniverse-0.1.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|