tooluniverse 1.0.9__py3-none-any.whl → 1.0.10__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/admetai_tool.py +1 -1
- tooluniverse/agentic_tool.py +65 -17
- tooluniverse/base_tool.py +19 -8
- tooluniverse/boltz_tool.py +1 -1
- tooluniverse/cache/result_cache_manager.py +167 -12
- tooluniverse/compose_scripts/drug_safety_analyzer.py +1 -1
- tooluniverse/compose_scripts/multi_agent_literature_search.py +1 -1
- tooluniverse/compose_scripts/output_summarizer.py +4 -4
- tooluniverse/compose_scripts/tool_graph_composer.py +1 -1
- tooluniverse/compose_scripts/tool_metadata_generator.py +1 -1
- tooluniverse/compose_tool.py +9 -9
- tooluniverse/core_tool.py +2 -2
- tooluniverse/ctg_tool.py +4 -4
- tooluniverse/custom_tool.py +1 -1
- tooluniverse/dataset_tool.py +2 -2
- tooluniverse/default_config.py +1 -1
- tooluniverse/enrichr_tool.py +14 -14
- tooluniverse/execute_function.py +520 -15
- tooluniverse/extended_hooks.py +4 -4
- tooluniverse/gene_ontology_tool.py +1 -1
- tooluniverse/generate_tools.py +3 -3
- tooluniverse/humanbase_tool.py +10 -10
- tooluniverse/logging_config.py +2 -2
- tooluniverse/mcp_client_tool.py +57 -129
- tooluniverse/mcp_integration.py +52 -49
- tooluniverse/mcp_tool_registry.py +147 -528
- tooluniverse/openalex_tool.py +8 -8
- tooluniverse/openfda_tool.py +2 -2
- tooluniverse/output_hook.py +15 -15
- tooluniverse/package_tool.py +1 -1
- tooluniverse/pmc_tool.py +2 -2
- tooluniverse/remote/boltz/boltz_mcp_server.py +1 -1
- tooluniverse/remote/depmap_24q2/depmap_24q2_mcp_tool.py +2 -2
- tooluniverse/remote/immune_compass/compass_tool.py +3 -3
- tooluniverse/remote/pinnacle/pinnacle_tool.py +2 -2
- tooluniverse/remote/transcriptformer/transcriptformer_tool.py +3 -3
- tooluniverse/remote/uspto_downloader/uspto_downloader_mcp_server.py +3 -3
- tooluniverse/remote_tool.py +4 -4
- tooluniverse/scripts/filter_tool_files.py +2 -2
- tooluniverse/smcp.py +93 -12
- tooluniverse/smcp_server.py +100 -20
- tooluniverse/space/__init__.py +46 -0
- tooluniverse/space/loader.py +133 -0
- tooluniverse/space/validator.py +353 -0
- tooluniverse/tool_finder_embedding.py +2 -2
- tooluniverse/tool_finder_keyword.py +9 -9
- tooluniverse/tool_finder_llm.py +6 -6
- tooluniverse/tools/_shared_client.py +3 -3
- tooluniverse/url_tool.py +1 -1
- tooluniverse/uspto_tool.py +1 -1
- tooluniverse/utils.py +10 -10
- {tooluniverse-1.0.9.dist-info → tooluniverse-1.0.10.dist-info}/METADATA +7 -3
- {tooluniverse-1.0.9.dist-info → tooluniverse-1.0.10.dist-info}/RECORD +57 -54
- {tooluniverse-1.0.9.dist-info → tooluniverse-1.0.10.dist-info}/WHEEL +0 -0
- {tooluniverse-1.0.9.dist-info → tooluniverse-1.0.10.dist-info}/entry_points.txt +0 -0
- {tooluniverse-1.0.9.dist-info → tooluniverse-1.0.10.dist-info}/licenses/LICENSE +0 -0
- {tooluniverse-1.0.9.dist-info → tooluniverse-1.0.10.dist-info}/top_level.txt +0 -0
tooluniverse/core_tool.py
CHANGED
|
@@ -43,7 +43,7 @@ class CoreTool(BaseTool):
|
|
|
43
43
|
year_to: End year filter
|
|
44
44
|
language: Language filter (e.g., 'en', 'es', 'fr')
|
|
45
45
|
|
|
46
|
-
Returns
|
|
46
|
+
Returns
|
|
47
47
|
List of paper dictionaries
|
|
48
48
|
"""
|
|
49
49
|
try:
|
|
@@ -134,7 +134,7 @@ class CoreTool(BaseTool):
|
|
|
134
134
|
Args:
|
|
135
135
|
tool_arguments: Dictionary containing search parameters
|
|
136
136
|
|
|
137
|
-
Returns
|
|
137
|
+
Returns
|
|
138
138
|
List of paper dictionaries
|
|
139
139
|
"""
|
|
140
140
|
query = tool_arguments.get("query", "")
|
tooluniverse/ctg_tool.py
CHANGED
|
@@ -34,7 +34,7 @@ class ClinicalTrialsTool(RESTfulTool):
|
|
|
34
34
|
Args:
|
|
35
35
|
arguments (dict): Runtime arguments provided to the tool's run method.
|
|
36
36
|
|
|
37
|
-
Returns
|
|
37
|
+
Returns
|
|
38
38
|
dict: A new dictionary with mapped parameter names.
|
|
39
39
|
"""
|
|
40
40
|
|
|
@@ -54,7 +54,7 @@ class ClinicalTrialsTool(RESTfulTool):
|
|
|
54
54
|
Args:
|
|
55
55
|
arguments (dict): Runtime arguments provided to the tool's run method.
|
|
56
56
|
|
|
57
|
-
Returns
|
|
57
|
+
Returns
|
|
58
58
|
dict: A dictionary of parameters ready for the API requests.
|
|
59
59
|
"""
|
|
60
60
|
api_params = {}
|
|
@@ -77,7 +77,7 @@ class ClinicalTrialsTool(RESTfulTool):
|
|
|
77
77
|
Args:
|
|
78
78
|
arguments (dict): Runtime arguments provided to the tool's run method.
|
|
79
79
|
|
|
80
|
-
Returns
|
|
80
|
+
Returns
|
|
81
81
|
str: The formatted endpoint URL.
|
|
82
82
|
"""
|
|
83
83
|
url_to_format = self.endpoint_url
|
|
@@ -185,7 +185,7 @@ class ClinicalTrialsSearchTool(ClinicalTrialsTool):
|
|
|
185
185
|
Args:
|
|
186
186
|
arguments (dict): A dictionary containing parameters provided by the user/LLM
|
|
187
187
|
|
|
188
|
-
Returns
|
|
188
|
+
Returns
|
|
189
189
|
dict or str: The JSON response from the API as a dictionary,
|
|
190
190
|
or raw text for non-JSON responses, or an error dictionary.
|
|
191
191
|
"""
|
tooluniverse/custom_tool.py
CHANGED
tooluniverse/dataset_tool.py
CHANGED
|
@@ -123,7 +123,7 @@ class DatasetTool(BaseTool):
|
|
|
123
123
|
- exact_match (bool): Whether to perform exact matching
|
|
124
124
|
- limit (int): Maximum number of results
|
|
125
125
|
|
|
126
|
-
Returns
|
|
126
|
+
Returns
|
|
127
127
|
dict: Search results with matched records and metadata
|
|
128
128
|
"""
|
|
129
129
|
query = arguments.get("query", "")
|
|
@@ -206,7 +206,7 @@ class DatasetTool(BaseTool):
|
|
|
206
206
|
- value (str): Value to filter by (optional for not_empty condition)
|
|
207
207
|
- limit (int): Maximum number of results
|
|
208
208
|
|
|
209
|
-
Returns
|
|
209
|
+
Returns
|
|
210
210
|
dict: Filtered results with matched records and applied filters
|
|
211
211
|
"""
|
|
212
212
|
field = arguments.get("field")
|
tooluniverse/default_config.py
CHANGED
tooluniverse/enrichr_tool.py
CHANGED
|
@@ -37,10 +37,10 @@ class EnrichrTool(BaseTool):
|
|
|
37
37
|
"""
|
|
38
38
|
Retrieve the official gene symbol for a given gene name or synonym using the MyGene.info API.
|
|
39
39
|
|
|
40
|
-
Parameters
|
|
40
|
+
Parameters
|
|
41
41
|
gene_name (str): The gene name or synonym to query.
|
|
42
42
|
|
|
43
|
-
Returns
|
|
43
|
+
Returns
|
|
44
44
|
str: The official gene symbol if found; otherwise, raises an Exception.
|
|
45
45
|
"""
|
|
46
46
|
# URL-encode the gene_name to handle special characters
|
|
@@ -89,10 +89,10 @@ class EnrichrTool(BaseTool):
|
|
|
89
89
|
"""
|
|
90
90
|
Submit the gene list to Enrichr and return the user list ID.
|
|
91
91
|
|
|
92
|
-
Parameters
|
|
92
|
+
Parameters
|
|
93
93
|
gene_list (str): Newline-separated string of gene names.
|
|
94
94
|
|
|
95
|
-
Returns
|
|
95
|
+
Returns
|
|
96
96
|
str: The user list ID from Enrichr.
|
|
97
97
|
"""
|
|
98
98
|
payload = {
|
|
@@ -110,11 +110,11 @@ class EnrichrTool(BaseTool):
|
|
|
110
110
|
"""
|
|
111
111
|
Fetch enrichment results for a specific library.
|
|
112
112
|
|
|
113
|
-
Parameters
|
|
113
|
+
Parameters
|
|
114
114
|
user_list_id (str): The user list ID from Enrichr.
|
|
115
115
|
library (str): The name of the enrichment library.
|
|
116
116
|
|
|
117
|
-
Returns
|
|
117
|
+
Returns
|
|
118
118
|
dict: The enrichment results.
|
|
119
119
|
"""
|
|
120
120
|
query_string = f"?userListId={user_list_id}&backgroundType={library}"
|
|
@@ -129,11 +129,11 @@ class EnrichrTool(BaseTool):
|
|
|
129
129
|
"""
|
|
130
130
|
Initialize and build the graph with gene nodes and enriched terms.
|
|
131
131
|
|
|
132
|
-
Parameters
|
|
132
|
+
Parameters
|
|
133
133
|
genes (list): List of gene names.
|
|
134
134
|
enrichment_results (dict): Dictionary of enrichment results by library.
|
|
135
135
|
|
|
136
|
-
Returns
|
|
136
|
+
Returns
|
|
137
137
|
networkx.Graph: The constructed graph.
|
|
138
138
|
"""
|
|
139
139
|
G = nx.Graph()
|
|
@@ -159,12 +159,12 @@ class EnrichrTool(BaseTool):
|
|
|
159
159
|
"""
|
|
160
160
|
Find and rank paths between source and target based on total edge weight.
|
|
161
161
|
|
|
162
|
-
Parameters
|
|
162
|
+
Parameters
|
|
163
163
|
G (networkx.Graph): The graph to search.
|
|
164
164
|
source (str): The source node.
|
|
165
165
|
target (str): The target node.
|
|
166
166
|
|
|
167
|
-
Returns
|
|
167
|
+
Returns
|
|
168
168
|
list: List of tuples (path, weight) sorted by weight descending.
|
|
169
169
|
"""
|
|
170
170
|
all_paths = list(nx.all_simple_paths(G, source=source, target=target))
|
|
@@ -182,12 +182,12 @@ class EnrichrTool(BaseTool):
|
|
|
182
182
|
"""
|
|
183
183
|
Find and rank paths from each gene to a specified term based on total edge weight.
|
|
184
184
|
|
|
185
|
-
Parameters
|
|
185
|
+
Parameters
|
|
186
186
|
G (networkx.Graph): The graph to search.
|
|
187
187
|
gene (str): The source gene.
|
|
188
188
|
term (str): The target term.
|
|
189
189
|
|
|
190
|
-
Returns
|
|
190
|
+
Returns
|
|
191
191
|
list or None: List of tuples (path, weight) sorted by weight descending, or None if no paths.
|
|
192
192
|
"""
|
|
193
193
|
all_paths = list(nx.all_simple_paths(G, source=gene, target=term))
|
|
@@ -207,11 +207,11 @@ class EnrichrTool(BaseTool):
|
|
|
207
207
|
"""
|
|
208
208
|
Main API function to perform gene enrichment analysis.
|
|
209
209
|
|
|
210
|
-
Parameters
|
|
210
|
+
Parameters
|
|
211
211
|
genes (list): List of gene names.
|
|
212
212
|
libs (list): List of enrichment libraries to use.
|
|
213
213
|
|
|
214
|
-
Returns
|
|
214
|
+
Returns
|
|
215
215
|
tuple: (connected_path, connections) dictionaries.
|
|
216
216
|
"""
|
|
217
217
|
# Convert each gene to its official name and log the result
|